Add permission and role management features

This commit is contained in:
faris Aljohari
2024-12-16 00:19:14 -06:00
parent 57397e653a
commit 64027d3a16
22 changed files with 473 additions and 17 deletions
@@ -3,6 +3,7 @@ import { AbstractEntity } from '../../abstract/entities/abstract.entity';
import { ProjectDto } from '../dtos';
import { CommunityEntity } from '../../community/entities';
import { SpaceModelEntity } from '../../space-model';
import { UserEntity } from '../../user/entities';
@Entity({ name: 'project' })
@Unique(['name'])
@@ -28,6 +29,9 @@ export class ProjectEntity extends AbstractEntity<ProjectDto> {
@OneToMany(() => CommunityEntity, (community) => community.project)
communities: CommunityEntity[];
@OneToMany(() => UserEntity, (user) => user.project)
public users: UserEntity[];
constructor(partial: Partial<ProjectEntity>) {
super();
Object.assign(this, partial);