mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
Added tuya space to community
This commit is contained in:
@ -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[];
|
||||
|
||||
|
Reference in New Issue
Block a user