mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 18:24:53 +00:00
added tag relation to project and product
This commit is contained in:
@ -5,6 +5,7 @@ import { CommunityEntity } from '../../community/entities';
|
||||
import { SpaceModelEntity } from '../../space-model';
|
||||
import { UserEntity } from '../../user/entities';
|
||||
import { InviteUserEntity } from '../../Invite-user/entities';
|
||||
import { NewTagEntity } from '../../tag/entities';
|
||||
|
||||
@Entity({ name: 'project' })
|
||||
@Unique(['name'])
|
||||
@ -36,6 +37,9 @@ export class ProjectEntity extends AbstractEntity<ProjectDto> {
|
||||
@OneToMany(() => InviteUserEntity, (inviteUser) => inviteUser.project)
|
||||
public invitedUsers: InviteUserEntity[];
|
||||
|
||||
@OneToMany(() => NewTagEntity, (tag) => tag.project, { cascade: true })
|
||||
public tags: NewTagEntity[];
|
||||
|
||||
constructor(partial: Partial<ProjectEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
|
||||
Reference in New Issue
Block a user