Added tuya space to community

This commit is contained in:
hannathkadher
2024-10-29 14:24:01 +04:00
parent 00ed2c5bbf
commit d6e6eb9b1f
8 changed files with 82 additions and 46 deletions

View File

@ -1,7 +1,6 @@
import { Column, Entity, ManyToOne, OneToMany, Unique } from 'typeorm';
import { Column, Entity, OneToMany, Unique } from 'typeorm';
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
import { CommunityDto } from '../dtos';
import { RegionEntity } from '../../region/entities';
import { SpaceEntity } from '../../space/entities';
@Entity({ name: 'community' })
@ -23,12 +22,6 @@ export class CommunityEntity extends AbstractEntity<CommunityDto> {
@Column({ length: 255, nullable: true })
description: string;
@ManyToOne(() => RegionEntity, (region) => region.communities, {
nullable: false,
onDelete: 'CASCADE',
})
region: RegionEntity;
@OneToMany(() => SpaceEntity, (space) => space.community)
spaces: SpaceEntity[];