feat: add generated code
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsOptional, IsDate, IsUUID } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { EquipmentStatus } from '@prisma/client';
|
||||
|
||||
export class CreateChangeEquipmentStatusDto {
|
||||
@ApiProperty({ description: 'Оборудование' })
|
||||
@IsUUID()
|
||||
equipmentId: string;
|
||||
|
||||
@ApiProperty({
|
||||
enum: EquipmentStatus,
|
||||
enumName: 'EquipmentStatus',
|
||||
description: 'Новый статус'
|
||||
})
|
||||
newStatus: EquipmentStatus;
|
||||
|
||||
@ApiProperty({ description: 'Номер', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
number?: string;
|
||||
|
||||
@ApiProperty({ description: 'Дата изменения статуса' })
|
||||
@Type(() => Date)
|
||||
@IsDate()
|
||||
date: Date;
|
||||
|
||||
@ApiProperty({ description: 'Ответственный', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
responsible?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user