feat(topology): 建筑支持地下楼层数,房间所在楼层下拉自动按地上+地下生成 - 建筑表新增floordown_count,建筑表单拆分地上/地下楼层数;房间所在楼层改下拉,按地上(1层/2层)与地下(负1层/负2层)自动生成、负楼层在前,选项采用数字格式
This commit is contained in:
1 parent
d12fa91ec2
commit
77891bf4f2
5 files changed
+52
-11
No files matched your search
@@ -13,6 +13,7 @@ export class CustomerBuildingCreateDTO {
|
||||
@IsOptional() @IsString() @MaxLength(2000) @Matches(/^[^<>]*$/) basicInfo?: string;
|
||||
@IsOptional() @IsString() @MaxLength(128) @Matches(/^[^<>]*$/) purpose?: string;
|
||||
@IsOptional() @IsInt() @Min(0) floorCount?: number;
|
||||
@IsOptional() @IsInt() @Min(0) floorDownCount?: number;
|
||||
}
|
||||
|
||||
export class CustomerBuildingUpdateDTO {
|
||||
@@ -21,4 +22,5 @@ export class CustomerBuildingUpdateDTO {
|
||||
@IsOptional() @IsString() @MaxLength(2000) @Matches(/^[^<>]*$/) basicInfo?: string;
|
||||
@IsOptional() @IsString() @MaxLength(128) @Matches(/^[^<>]*$/) purpose?: string;
|
||||
@IsOptional() @IsInt() @Min(0) floorCount?: number;
|
||||
@IsOptional() @IsInt() @Min(0) floorDownCount?: number;
|
||||
}
|
||||
@@ -26,9 +26,12 @@ export default class CustomerBuilding extends Model {
|
||||
@Column({ type: DataType.STRING(128), comment: "用途" })
|
||||
purpose!: string;
|
||||
|
||||
@Column({ type: DataType.INTEGER, field: "floor_count", comment: "层数" })
|
||||
@Column({ type: DataType.INTEGER, field: "floor_count", comment: "地上楼层数" })
|
||||
floorCount!: number;
|
||||
|
||||
@Column({ type: DataType.INTEGER, field: "floordown_count", comment: "地下楼层数", defaultValue: 0 })
|
||||
floorDownCount!: number;
|
||||
|
||||
@BelongsTo(() => Customer)
|
||||
customer!: Customer;
|
||||
|
||||
|
||||
Reference in new issue
Block a user