mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 11:34:53 +00:00
fixed space name
This commit is contained in:
@ -26,8 +26,6 @@ export class SpaceTypeEntity extends AbstractEntity<SpaceTypeDto> {
|
|||||||
})
|
})
|
||||||
type: string;
|
type: string;
|
||||||
|
|
||||||
@OneToMany(() => SpaceEntity, (space) => space.spaceType)
|
|
||||||
spaces: SpaceEntity[];
|
|
||||||
constructor(partial: Partial<SpaceTypeEntity>) {
|
constructor(partial: Partial<SpaceTypeEntity>) {
|
||||||
super();
|
super();
|
||||||
Object.assign(this, partial);
|
Object.assign(this, partial);
|
||||||
@ -69,10 +67,6 @@ export class SpaceEntity extends AbstractEntity<SpaceDto> {
|
|||||||
|
|
||||||
@OneToMany(() => SpaceEntity, (space) => space.parent)
|
@OneToMany(() => SpaceEntity, (space) => space.parent)
|
||||||
children: SpaceEntity[];
|
children: SpaceEntity[];
|
||||||
@ManyToOne(() => SpaceTypeEntity, (spaceType) => spaceType.spaces, {
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
spaceType: SpaceTypeEntity;
|
|
||||||
|
|
||||||
@OneToMany(() => UserSpaceEntity, (userSpace) => userSpace.space)
|
@OneToMany(() => UserSpaceEntity, (userSpace) => userSpace.space)
|
||||||
userSpaces: UserSpaceEntity[];
|
userSpaces: UserSpaceEntity[];
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export class AddSpaceDto {
|
|||||||
})
|
})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
name: string;
|
spaceName: string;
|
||||||
|
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'UUID of the parent space (if any, for hierarchical spaces)',
|
description: 'UUID of the parent space (if any, for hierarchical spaces)',
|
||||||
|
|||||||
Reference in New Issue
Block a user