Se agregaron funciones y cambios en los dto
This commit is contained in:
@@ -1 +1,42 @@
|
||||
export class CreateServicioDto {}
|
||||
import {
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsDateString,
|
||||
IsEmail,
|
||||
IsDate,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CrearServicioDto {
|
||||
@IsNumber()
|
||||
idUsuario: number;
|
||||
|
||||
@IsNumber()
|
||||
idPrograma: number;
|
||||
|
||||
@IsNumber()
|
||||
idCarrera: number;
|
||||
|
||||
@IsString()
|
||||
numeroCuenta: string;
|
||||
|
||||
@IsNumber()
|
||||
creditos: number;
|
||||
|
||||
@IsEmail()
|
||||
correo: string;
|
||||
|
||||
@IsDate()
|
||||
fechaInicio: Date;
|
||||
|
||||
@IsDate()
|
||||
fechaFin: Date;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
programaInterno?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
profesor?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import {
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
MaxLength,
|
||||
} from 'class-validator';
|
||||
|
||||
export class RegistroValidadoDto {
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
idServicio: number;
|
||||
|
||||
@IsOptional()
|
||||
fechaNacimiento?: Date;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(15)
|
||||
telefono?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(200)
|
||||
direccion?: string;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { IsOptional, IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class ServiciosAdminDto {
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
pagina?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
idStatus?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
nombre?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
numeroCuenta?: string;
|
||||
}
|
||||
@@ -1,9 +1,23 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ServicioService } from './servicio.service';
|
||||
import { ServicioController } from './servicio.controller';
|
||||
import { DriveService } from 'src/drive/drive.service';
|
||||
import { ValidacionService } from 'src/helpers.services/validacion.service';
|
||||
import { gmail } from 'src/helpers.services/gmail.service';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { Servicio } from './entities/servicio.entity';
|
||||
import { Usuario } from 'src/usuario/entities/usuario.entity';
|
||||
import { ArchivoService } from 'src/helpers.services/archivo.service';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Servicio, Usuario])],
|
||||
controllers: [ServicioController],
|
||||
providers: [ServicioService],
|
||||
providers: [
|
||||
ServicioService,
|
||||
DriveService,
|
||||
ValidacionService,
|
||||
gmail,
|
||||
ArchivoService,
|
||||
],
|
||||
})
|
||||
export class ServicioModule {}
|
||||
|
||||
+1003
-31
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user