operador listo
This commit is contained in:
parent
3417ff60f3
commit
30c32c93c0
@ -41,7 +41,7 @@ import { InstitucionInfraccion } from './institucion-infraccion/entity/instituci
|
||||
import { Modulo } from './modulo/entity/modulo.entity';
|
||||
import { Motivo } from './motivo/entity/motivo.entity';
|
||||
import { Multa } from './multa/entity/multa.entity';
|
||||
import { Operador } from './operador/operador.entity';
|
||||
import { Operador } from './operador/entity/operador.entity';
|
||||
import { Prestamo } from './prestamo/prestamo.entity';
|
||||
import { Programa } from './programa/programa.entity';
|
||||
import { Status } from './status/status.entity';
|
||||
|
@ -3,7 +3,7 @@ import { Carrera } from '../../carrera/entity/carrera.entity';
|
||||
import { InstitucionDia } from '../../institucion-dia/entity/institucion-dia.entity';
|
||||
import { InstitucionInfraccion } from '../../institucion-infraccion/entity/institucion-infraccion.entity';
|
||||
import { Modulo } from '../../modulo/entity/modulo.entity';
|
||||
import { Operador } from '../../operador/operador.entity';
|
||||
import { Operador } from '../../operador/entity/operador.entity';
|
||||
import { Usuario } from '../../usuario/usuario.entity';
|
||||
|
||||
@Entity()
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { Equipo } from '../../equipo/entity/equipo.entity';
|
||||
import { Operador } from '../../operador/operador.entity';
|
||||
import { Operador } from '../../operador/entity/operador.entity';
|
||||
import { Status } from '../../status/status.entity';
|
||||
|
||||
@Entity()
|
||||
|
@ -1,30 +1,30 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
OneToMany,
|
||||
ManyToOne,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { Institucion } from '../institucion/entity/institucion.entity';
|
||||
import { Motivo } from '../motivo/entity/motivo.entity';
|
||||
import { Prestamo } from '../prestamo/prestamo.entity';
|
||||
import { TipoUsuario } from '../tipo-usuario/tipo-usuario.entity';
|
||||
import { Institucion } from '../../institucion/entity/institucion.entity';
|
||||
import { Motivo } from '../../motivo/entity/motivo.entity';
|
||||
import { Prestamo } from '../../prestamo/prestamo.entity';
|
||||
import { TipoUsuario } from '../../tipo-usuario/tipo-usuario.entity';
|
||||
|
||||
@Entity()
|
||||
export class Operador {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_operador: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: Boolean, nullable: false, default: false })
|
||||
activo: boolean;
|
||||
|
||||
@Column({ type: String, nullable: false, length: 50 })
|
||||
operador: string;
|
||||
|
||||
@Column()
|
||||
@Column({ type: String, nullable: false, length: 60 })
|
||||
password: string;
|
||||
|
||||
@Column()
|
||||
activo: boolean;
|
||||
|
||||
@ManyToOne(() => Institucion, (institucion) => institucion.operadores)
|
||||
@JoinColumn({ name: 'id_institucion' })
|
||||
institucion: Institucion;
|
@ -1,7 +1,25 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller, Get, Post, Put } from '@nestjs/common';
|
||||
import { OperadorService } from './operador.service';
|
||||
|
||||
@Controller('operador')
|
||||
export class OperadorController {
|
||||
constructor(private operadorService: OperadorService) {}
|
||||
|
||||
@Post()
|
||||
create() {}
|
||||
|
||||
@Post('login')
|
||||
login() {}
|
||||
|
||||
@Get('operador')
|
||||
operador() {}
|
||||
|
||||
@Get('operadores')
|
||||
operadores() {}
|
||||
|
||||
@Get('reporte')
|
||||
reporte() {}
|
||||
|
||||
@Put()
|
||||
update() {}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
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';
|
||||
import { Operador } from './entity/operador.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Operador])],
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Operador } from './operador.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Operador } from './entity/operador.entity';
|
||||
|
||||
@Injectable()
|
||||
export class OperadorService {
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { Equipo } from '../equipo/entity/equipo.entity';
|
||||
import { Operador } from '../operador/operador.entity';
|
||||
import { Operador } from '../operador/entity/operador.entity';
|
||||
import { Usuario } from '../usuario/usuario.entity';
|
||||
|
||||
@Entity()
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
||||
import { Usuario } from '../usuario/usuario.entity';
|
||||
import { Operador } from '../operador/operador.entity';
|
||||
import { Operador } from '../operador/entity/operador.entity';
|
||||
|
||||
@Entity()
|
||||
export class TipoUsuario {
|
||||
|
Loading…
Reference in New Issue
Block a user