updated space update

This commit is contained in:
hannathkadher
2024-12-25 10:52:48 +04:00
parent 2e46176fd5
commit a74a0db26e
13 changed files with 331 additions and 168 deletions
@@ -58,4 +58,9 @@ export class SpaceModelEntity extends AbstractEntity<SpaceModelDto> {
@OneToMany(() => TagModel, (tag) => tag.spaceModel)
tags: TagModel[];
constructor(partial: Partial<SpaceModelEntity>) {
super();
Object.assign(this, partial);
}
}
@@ -30,10 +30,10 @@ export class SubspaceModelEntity extends AbstractEntity<SubSpaceModelDto> {
)
public spaceModel: SpaceModelEntity;
@OneToMany(() => SubspaceEntity, (space) => space.subSpaceModel, {
@OneToMany(() => SubspaceEntity, (subspace) => subspace.subSpaceModel, {
cascade: true,
})
public spaces: SubspaceEntity[];
public subspaceModel: SubspaceEntity[];
@Column({
nullable: false,