mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 10:46:17 +00:00
79 lines
1.5 KiB
TypeScript
79 lines
1.5 KiB
TypeScript
import { SceneSwitchesTypeEnum } from '@app/common/constants/scene-switch-type.enum';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
export class AddDeviceDto {
|
|
@ApiProperty({
|
|
description: 'deviceTuyaUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public deviceTuyaUuid: string;
|
|
@ApiProperty({
|
|
description: 'spaceUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public spaceUuid: string;
|
|
|
|
@ApiProperty({
|
|
description: 'deviceName',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public deviceName: string;
|
|
}
|
|
export class AssignDeviceToSpaceDto {
|
|
@ApiProperty({
|
|
description: 'deviceUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public deviceUuid: string;
|
|
|
|
@ApiProperty({
|
|
description: 'spaceUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public spaceUuid: string;
|
|
}
|
|
export class AddSceneToFourSceneDeviceDto {
|
|
@ApiProperty({
|
|
description: 'switchName',
|
|
required: true,
|
|
})
|
|
@IsEnum(SceneSwitchesTypeEnum)
|
|
@IsNotEmpty()
|
|
switchName: SceneSwitchesTypeEnum;
|
|
|
|
@ApiProperty({
|
|
description: 'sceneUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public sceneUuid: string;
|
|
@ApiProperty({
|
|
description: 'spaceUuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public spaceUuid: string;
|
|
}
|
|
export class UpdateDeviceDto {
|
|
@ApiProperty({
|
|
description: 'deviceName',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
public deviceName: string;
|
|
}
|