This commit is contained in:
xXpuma99Xx
2022-04-04 20:02:54 -05:00
parent 4681fb1f58
commit 3c8dd17089
62 changed files with 541 additions and 4 deletions
+53
View File
@@ -14,6 +14,8 @@
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"@nestjs/typeorm": "^8.0.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"mysql2": "^2.3.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
@@ -3062,6 +3064,20 @@
"integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==",
"dev": true
},
"node_modules/class-transformer": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz",
"integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw=="
},
"node_modules/class-validator": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz",
"integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==",
"dependencies": {
"libphonenumber-js": "^1.9.43",
"validator": "^13.7.0"
}
},
"node_modules/cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
@@ -6269,6 +6285,11 @@
"node": ">= 0.8.0"
}
},
"node_modules/libphonenumber-js": {
"version": "1.9.50",
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.50.tgz",
"integrity": "sha512-cCzQPChw2XbordcO2LKiw5Htx5leHVfFk/EXkxNHqJfFo7Fndcb1kF5wPJpc316vCJhhikedYnVysMh3Sc7Ocw=="
},
"node_modules/lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -8832,6 +8853,14 @@
"node": ">=10.12.0"
}
},
"node_modules/validator": {
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
"integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -11604,6 +11633,20 @@
"integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==",
"dev": true
},
"class-transformer": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz",
"integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw=="
},
"class-validator": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz",
"integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==",
"requires": {
"libphonenumber-js": "^1.9.43",
"validator": "^13.7.0"
}
},
"cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
@@ -14048,6 +14091,11 @@
"type-check": "~0.4.0"
}
},
"libphonenumber-js": {
"version": "1.9.50",
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.50.tgz",
"integrity": "sha512-cCzQPChw2XbordcO2LKiw5Htx5leHVfFk/EXkxNHqJfFo7Fndcb1kF5wPJpc316vCJhhikedYnVysMh3Sc7Ocw=="
},
"lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -15892,6 +15940,11 @@
"source-map": "^0.7.3"
}
},
"validator": {
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
"integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw=="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+2
View File
@@ -26,6 +26,8 @@
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"@nestjs/typeorm": "^8.0.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"mysql2": "^2.3.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
+2 -1
View File
@@ -48,6 +48,7 @@ import { TipoCarrito } from './tipo-carrito/tipo-carrito.entity';
import { TipoEntrada } from './tipo-entrada/tipo-entrada.entity';
import { TipoUsuario } from './tipo-usuario/tipo-usuario.entity';
import { Usuario } from './usuario/usuario.entity';
import { HoraExcepcionService } from './hora_excepcion/hora_excepcion.service';
@Module({
imports: [
@@ -113,6 +114,6 @@ import { Usuario } from './usuario/usuario.entity';
UsuarioModule,
],
controllers: [AppController],
providers: [AppService],
providers: [AppService, HoraExcepcionService],
})
export class AppModule {}
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CarreraProgramaController } from './carrera-programa.controller';
import { CarreraPrograma } from './carrera-programa.entity';
import { CarreraProgramaService } from './carrera-programa.service';
@Module({
imports: [TypeOrmModule.forFeature([CarreraPrograma])],
controllers: [CarreraProgramaController],
providers: [CarreraProgramaService],
})
export class CarreraProgramaModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CarreraProgramaService } from './carrera-programa.service';
describe('CarreraProgramaService', () => {
let service: CarreraProgramaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [CarreraProgramaService],
}).compile();
service = module.get<CarreraProgramaService>(CarreraProgramaService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class CarreraProgramaService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CarreraController } from './carrera.controller';
import { Carrera } from './carrera.entity';
import { CarreraService } from './carrera.service';
@Module({
imports: [TypeOrmModule.forFeature([Carrera])],
controllers: [CarreraController],
providers: [CarreraService],
})
export class CarreraModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CarreraService } from './carrera.service';
describe('CarreraService', () => {
let service: CarreraService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [CarreraService],
}).compile();
service = module.get<CarreraService>(CarreraService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class CarreraService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CarritoController } from './carrito.controller';
import { Carrito } from './carrito.entity';
import { CarritoService } from './carrito.service';
@Module({
imports: [TypeOrmModule.forFeature([Carrito])],
controllers: [CarritoController],
providers: [CarritoService],
})
export class CarritoModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CarritoService } from './carrito.service';
describe('CarritoService', () => {
let service: CarritoService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [CarritoService],
}).compile();
service = module.get<CarritoService>(CarritoService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class CarritoService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { EquipoController } from './equipo.controller';
import { Equipo } from './equipo.entity';
import { EquipoService } from './equipo.service';
@Module({
imports: [TypeOrmModule.forFeature([Equipo])],
controllers: [EquipoController],
providers: [EquipoService],
})
export class EquipoModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { EquipoService } from './equipo.service';
describe('EquipoService', () => {
let service: EquipoService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [EquipoService],
}).compile();
service = module.get<EquipoService>(EquipoService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class EquipoService {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { HoraExcepcionService } from './hora_excepcion.service';
describe('HoraExcepcionService', () => {
let service: HoraExcepcionService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [HoraExcepcionService],
}).compile();
service = module.get<HoraExcepcionService>(HoraExcepcionService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class HoraExcepcionService {}
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { InstitucionDiaController } from './institucion-dia.controller';
import { InstitucionDia } from './institucion-dia.entity';
import { InstitucionDiaService } from './institucion-dia.service';
@Module({
imports: [TypeOrmModule.forFeature([InstitucionDia])],
controllers: [InstitucionDiaController],
providers: [InstitucionDiaService],
})
export class InstitucionDiaModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { InstitucionDiaService } from './institucion-dia.service';
describe('InstitucionDiaService', () => {
let service: InstitucionDiaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [InstitucionDiaService],
}).compile();
service = module.get<InstitucionDiaService>(InstitucionDiaService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class InstitucionDiaService {}
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { InstitucionInfraccionController } from './institucion-infraccion.controller';
import { InstitucionInfraccion } from './institucion-infraccion.entity';
import { InstitucionInfraccionService } from './institucion-infraccion.service';
@Module({
imports: [TypeOrmModule.forFeature([InstitucionInfraccion])],
controllers: [InstitucionInfraccionController],
providers: [InstitucionInfraccionService],
})
export class InstitucionInfraccionModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { InstitucionInfraccionService } from './institucion-infraccion.service';
describe('InstitucionInfraccionService', () => {
let service: InstitucionInfraccionService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [InstitucionInfraccionService],
}).compile();
service = module.get<InstitucionInfraccionService>(InstitucionInfraccionService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class InstitucionInfraccionService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { InstitucionController } from './institucion.controller';
import { Institucion } from './institucion.entity';
import { InstitucionService } from './institucion.service';
@Module({
imports: [TypeOrmModule.forFeature([Institucion])],
controllers: [InstitucionController],
providers: [InstitucionService],
})
export class InstitucionModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { InstitucionService } from './institucion.service';
describe('InstitucionService', () => {
let service: InstitucionService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [InstitucionService],
}).compile();
service = module.get<InstitucionService>(InstitucionService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class InstitucionService {}
+2
View File
@@ -1,8 +1,10 @@
import { NestFactory } from '@nestjs/core';
import { ValidationPipe } from '@nestjs/common';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
await app.listen(3000);
}
bootstrap();
+6
View File
@@ -0,0 +1,6 @@
import { IsNumberString } from 'class-validator';
export class ModulosDto {
@IsNumberString()
id_institucion: string;
}
+9 -3
View File
@@ -1,4 +1,10 @@
import { Controller } from '@nestjs/common';
import { Controller, Get, Query } from '@nestjs/common';
import { ModulosDto } from './dto/modulos.dto';
import { ModuloService } from './modulo.service';
@Controller('modulo')
export class ModuloController {}
export class ModuloController {
constructor(private moduloService: ModuloService) {}
@Get('modulos')
Modulos(@Query() query: ModulosDto) {}
}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ModuloController } from './modulo.controller';
import { Modulo } from './modulo.entity';
import { ModuloService } from './modulo.service';
@Module({
imports: [TypeOrmModule.forFeature([Modulo])],
controllers: [ModuloController],
providers: [ModuloService],
})
export class ModuloModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ModuloService } from './modulo.service';
describe('ModuloService', () => {
let service: ModuloService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [ModuloService],
}).compile();
service = module.get<ModuloService>(ModuloService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+17
View File
@@ -0,0 +1,17 @@
import { Injectable } from '@nestjs/common';
import { Repository } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';
import { Modulo } from './modulo.entity';
@Injectable()
export class ModuloService {
constructor(
@InjectRepository(Modulo) private repository: Repository<Modulo>,
) {}
create() {
const modulo = this.repository.create({ activo: true });
return this.repository.save(modulo);
}
}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MotivoController } from './motivo.controller';
import { Motivo } from './motivo.entity';
import { MotivoService } from './motivo.service';
@Module({
imports: [TypeOrmModule.forFeature([Motivo])],
controllers: [MotivoController],
providers: [MotivoService],
})
export class MotivoModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { MotivoService } from './motivo.service';
describe('MotivoService', () => {
let service: MotivoService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [MotivoService],
}).compile();
service = module.get<MotivoService>(MotivoService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class MotivoService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MultaController } from './multa.controller';
import { Multa } from './multa.entity';
import { MultaService } from './multa.service';
@Module({
imports: [TypeOrmModule.forFeature([Multa])],
controllers: [MultaController],
providers: [MultaService],
})
export class MultaModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { MultaService } from './multa.service';
describe('MultaService', () => {
let service: MultaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [MultaService],
}).compile();
service = module.get<MultaService>(MultaService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class MultaService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { OperadorController } from './operador.controller';
import { Operador } from './operador.entity';
import { OperadorService } from './operador.service';
@Module({
imports: [TypeOrmModule.forFeature([Operador])],
controllers: [OperadorController],
providers: [OperadorService],
})
export class OperadorModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { OperadorService } from './operador.service';
describe('OperadorService', () => {
let service: OperadorService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [OperadorService],
}).compile();
service = module.get<OperadorService>(OperadorService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class OperadorService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PrestamoController } from './prestamo.controller';
import { Prestamo } from './prestamo.entity';
import { PrestamoService } from './prestamo.service';
@Module({
imports: [TypeOrmModule.forFeature([Prestamo])],
controllers: [PrestamoController],
providers: [PrestamoService],
})
export class PrestamoModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { PrestamoService } from './prestamo.service';
describe('PrestamoService', () => {
let service: PrestamoService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [PrestamoService],
}).compile();
service = module.get<PrestamoService>(PrestamoService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class PrestamoService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ProgramaController } from './programa.controller';
import { Programa } from './programa.entity';
import { ProgramaService } from './programa.service';
@Module({
imports: [TypeOrmModule.forFeature([Programa])],
controllers: [ProgramaController],
providers: [ProgramaService],
})
export class ProgramaModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ProgramaService } from './programa.service';
describe('ProgramaService', () => {
let service: ProgramaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [ProgramaService],
}).compile();
service = module.get<ProgramaService>(ProgramaService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class ProgramaService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { StatusController } from './status.controller';
import { Status } from './status.entity';
import { StatusService } from './status.service';
@Module({
imports: [TypeOrmModule.forFeature([Status])],
controllers: [StatusController],
providers: [StatusService],
})
export class StatusModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { StatusService } from './status.service';
describe('StatusService', () => {
let service: StatusService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [StatusService],
}).compile();
service = module.get<StatusService>(StatusService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class StatusService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TipoCarritoController } from './tipo-carrito.controller';
import { TipoCarrito } from './tipo-carrito.entity';
import { TipoCarritoService } from './tipo-carrito.service';
@Module({
imports: [TypeOrmModule.forFeature([TipoCarrito])],
controllers: [TipoCarritoController],
providers: [TipoCarritoService],
})
export class TipoCarritoModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { TipoCarritoService } from './tipo-carrito.service';
describe('TipoCarritoService', () => {
let service: TipoCarritoService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [TipoCarritoService],
}).compile();
service = module.get<TipoCarritoService>(TipoCarritoService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class TipoCarritoService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TipoEntradaController } from './tipo-entrada.controller';
import { TipoEntrada } from './tipo-entrada.entity';
import { TipoEntradaService } from './tipo-entrada.service';
@Module({
imports: [TypeOrmModule.forFeature([TipoEntrada])],
controllers: [TipoEntradaController],
providers: [TipoEntradaService],
})
export class TipoEntradaModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { TipoEntradaService } from './tipo-entrada.service';
describe('TipoEntradaService', () => {
let service: TipoEntradaService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [TipoEntradaService],
}).compile();
service = module.get<TipoEntradaService>(TipoEntradaService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class TipoEntradaService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TipoUsuarioController } from './tipo-usuario.controller';
import { TipoUsuario } from './tipo-usuario.entity';
import { TipoUsuarioService } from './tipo-usuario.service';
@Module({
imports: [TypeOrmModule.forFeature([TipoUsuario])],
controllers: [TipoUsuarioController],
providers: [TipoUsuarioService],
})
export class TipoUsuarioModule {}
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { TipoUsuarioService } from './tipo-usuario.service';
describe('TipoUsuarioService', () => {
let service: TipoUsuarioService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [TipoUsuarioService],
}).compile();
service = module.get<TipoUsuarioService>(TipoUsuarioService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class TipoUsuarioService {}
+2
View File
@@ -2,9 +2,11 @@ import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsuarioController } from './usuario.controller';
import { Usuario } from './usuario.entity';
import { UsuarioService } from './usuario.service';
@Module({
imports: [TypeOrmModule.forFeature([Usuario])],
controllers: [UsuarioController],
providers: [UsuarioService],
})
export class UsuarioModule {}
+18
View File
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { UsuarioService } from './usuario.service';
describe('UsuarioService', () => {
let service: UsuarioService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [UsuarioService],
}).compile();
service = module.get<UsuarioService>(UsuarioService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});
+4
View File
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class UsuarioService {}