feat: add generated code
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { IsString, IsNotEmpty, IsEnum, IsOptional, IsDateString, IsUUID } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { EquipmentStatus } from '@prisma/client';
|
||||
|
||||
export class CreateChangeEquipmentStatusDto {
|
||||
@ApiProperty()
|
||||
@IsUUID()
|
||||
@IsNotEmpty()
|
||||
equipmentId: string;
|
||||
|
||||
@ApiProperty({ enum: EquipmentStatus, enumName: 'EquipmentStatus' })
|
||||
@IsEnum(EquipmentStatus)
|
||||
newStatus: EquipmentStatus;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
number?: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsDateString({ strict: false })
|
||||
@IsNotEmpty()
|
||||
date: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
responsible?: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateChangeEquipmentStatusDto } from './create-change-equipment-status.dto';
|
||||
|
||||
export class UpdateChangeEquipmentStatusDto extends PartialType(CreateChangeEquipmentStatusDto) {}
|
||||
Reference in New Issue
Block a user