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