XMerge remote-tracking branch 'origin/develop' into Axel
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class ServiciosResponsableDto {
|
||||
@IsNumber()
|
||||
idUsuario: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
idStatus?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
nombre?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
numeroCuenta?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
pagina?: number;
|
||||
}
|
||||
@@ -1,4 +1,41 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateServicioDto } from './create-servicio.dto';
|
||||
import {
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsEmail,
|
||||
IsDateString,
|
||||
IsNumber,
|
||||
MaxLength,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class UpdateServicioDto extends PartialType(CreateServicioDto) {}
|
||||
export class UpdateServicioDto {
|
||||
@IsNumber({}, { message: 'idServicio debe ser un número entero' })
|
||||
@Type(() => Number)
|
||||
idServicio: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail({}, { message: 'correo debe ser un correo válido' })
|
||||
correo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString({}, { message: 'fechaInicio debe ser una fecha válida' })
|
||||
fechaInicio?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString({}, { message: 'fechaFin debe ser una fecha válida' })
|
||||
fechaFin?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString({}, { message: 'fechaNacimiento debe ser una fecha válida' })
|
||||
fechaNacimiento?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString({ message: 'direccion debe ser texto' })
|
||||
@MaxLength(200, { message: 'direccion no debe exceder los 200 caracteres' })
|
||||
direccion?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString({ message: 'telefono debe ser un número o texto válido' })
|
||||
@MaxLength(15, { message: 'telefono no debe exceder los 15 caracteres' })
|
||||
telefono?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user