mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 00:57:55 +00:00
feat(device): add endpoint to add device to user
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class AddDeviceInRoomDto {
|
||||
export class AddDeviceDto {
|
||||
@ApiProperty({
|
||||
description: 'deviceTuyaUuid',
|
||||
required: true,
|
||||
@@ -10,6 +10,23 @@ export class AddDeviceInRoomDto {
|
||||
@IsNotEmpty()
|
||||
public deviceTuyaUuid: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'userUuid',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public userUuid: string;
|
||||
}
|
||||
export class UpdateDeviceInRoomDto {
|
||||
@ApiProperty({
|
||||
description: 'deviceUuid',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public deviceUuid: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'roomUuid',
|
||||
required: true,
|
||||
|
||||
Reference in New Issue
Block a user