43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
import { Transform } from 'class-transformer';
|
|
import {
|
|
IsEmpty,
|
|
IsISO8601,
|
|
IsOptional,
|
|
IsString,
|
|
MaxLength,
|
|
} from 'class-validator';
|
|
|
|
export class UpdateInspectionVisitDto {
|
|
@IsOptional()
|
|
@Transform(({ value }) =>
|
|
typeof value === 'string' && value.trim() ? value.trim() : null,
|
|
)
|
|
@IsString()
|
|
@MaxLength(4000)
|
|
objective?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsEmpty({ message: 'El Yacimiento se fija al crear la Inspección y no puede modificarse' })
|
|
scopeAssetId?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsEmpty({ message: 'El Área se fija al crear la Inspección y no puede modificarse' })
|
|
operationalAreaId?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsEmpty({ message: 'La Operadora se fija al crear la Inspección y no puede modificarse' })
|
|
operatorCompanyId?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsISO8601({ strict: true })
|
|
plannedStartAt?: string | null;
|
|
|
|
@IsOptional()
|
|
@Transform(({ value }) =>
|
|
typeof value === 'string' && value.trim() ? value.trim() : null,
|
|
)
|
|
@IsString()
|
|
@MaxLength(4000)
|
|
instructions?: string | null;
|
|
}
|