2025-09-24 11:00:56 -06:00
|
|
|
import {
|
|
|
|
|
IsInt,
|
|
|
|
|
IsNotEmpty,
|
|
|
|
|
IsOptional,
|
|
|
|
|
IsString,
|
|
|
|
|
MaxLength,
|
|
|
|
|
MinLength,
|
|
|
|
|
} from 'class-validator';
|
|
|
|
|
|
|
|
|
|
export class Login {
|
|
|
|
|
@IsString()
|
|
|
|
|
usuario: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
password: string;
|
|
|
|
|
}
|
2025-09-09 21:19:17 -04:00
|
|
|
|
|
|
|
|
export class CreateUserDto {
|
2025-09-10 16:15:36 -06:00
|
|
|
@IsString()
|
2025-09-24 11:00:56 -06:00
|
|
|
@IsNotEmpty()
|
|
|
|
|
nombre: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
apellido_paterno: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsOptional()
|
|
|
|
|
apellido_materno?: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsNotEmpty()
|
2025-09-10 16:15:36 -06:00
|
|
|
usuario: string;
|
2025-09-09 21:19:17 -04:00
|
|
|
|
2025-09-10 16:15:36 -06:00
|
|
|
@IsString()
|
2025-09-24 11:00:56 -06:00
|
|
|
@IsNotEmpty()
|
|
|
|
|
@MinLength(6)
|
|
|
|
|
@MaxLength(45)
|
2025-09-10 16:15:36 -06:00
|
|
|
password: string;
|
2025-09-24 11:00:56 -06:00
|
|
|
|
|
|
|
|
@IsInt()
|
|
|
|
|
@IsOptional()
|
|
|
|
|
activo?: number;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@MaxLength(50)
|
|
|
|
|
descripcion?: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsOptional()
|
|
|
|
|
fecha_registro?: string;
|
|
|
|
|
|
|
|
|
|
@IsInt()
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
id_perfil: number;
|
2025-09-09 21:19:17 -04:00
|
|
|
}
|
2025-09-24 11:04:08 -04:00
|
|
|
|
|
|
|
|
export class changePasswordDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
password: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
newPassword: string;
|
2025-09-24 11:34:50 -06:00
|
|
|
}
|