mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +00:00
30 lines
647 B
TypeScript
30 lines
647 B
TypeScript
import { PermissionType } from '@app/common/constants/permission-type.enum';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
export class UserDevicePermissionAddDto {
|
|
@ApiProperty({
|
|
description: 'user uuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
userUuid: string;
|
|
|
|
@ApiProperty({
|
|
description: 'permission type',
|
|
enum: PermissionType,
|
|
required: true,
|
|
})
|
|
@IsEnum(PermissionType)
|
|
permissionType: PermissionType;
|
|
|
|
@ApiProperty({
|
|
description: 'device uuid',
|
|
required: true,
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
deviceUuid: string;
|
|
}
|