Removed community user

This commit is contained in:
hannathkadher
2024-10-29 13:19:47 +04:00
parent 9aecb3c3bc
commit 84bcf098d3
4 changed files with 9 additions and 33 deletions

View File

@ -1,16 +1,8 @@
import {
Column,
Entity,
ManyToMany,
ManyToOne,
OneToMany,
Unique,
} from 'typeorm';
import { Column, Entity, ManyToOne, 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';
import { UserEntity } from '../../user/entities';
@Entity({ name: 'community' })
@Unique(['name'])
@ -40,6 +32,10 @@ export class CommunityEntity extends AbstractEntity<CommunityDto> {
@OneToMany(() => SpaceEntity, (space) => space.community)
spaces: SpaceEntity[];
@ManyToMany(() => UserEntity, (user) => user.communities)
users: UserEntity[];
@Column({
type: 'varchar',
length: 255,
nullable: true,
})
externalId: string;
}