listo institucion dia
This commit is contained in:
parent
32f3cc2943
commit
8516b3c199
@ -36,7 +36,7 @@ import { EquipoTipoEntrada } from './equipo-tipo-entrada/entity/equipo-tipo-entr
|
||||
import { HoraExcepcion } from './hora-excepcion/entity/hora-excepcion.entity';
|
||||
import { Infraccion } from './infraccion/entity/infraccion.entity';
|
||||
import { Institucion } from './institucion/entity/institucion.entity';
|
||||
import { InstitucionDia } from './institucion-dia/institucion-dia.entity';
|
||||
import { InstitucionDia } from './institucion-dia/entity/institucion-dia.entity';
|
||||
import { InstitucionInfraccion } from './institucion-infraccion/institucion-infraccion.entity';
|
||||
import { Modulo } from './modulo/entity/modulo.entity';
|
||||
import { Motivo } from './motivo/motivo.entity';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
||||
import { InstitucionDia } from '../../institucion-dia/institucion-dia.entity';
|
||||
import { InstitucionDia } from '../../institucion-dia/entity/institucion-dia.entity';
|
||||
|
||||
@Entity()
|
||||
export class Dia {
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { InstitucionDia } from '../../institucion-dia/institucion-dia.entity';
|
||||
import { InstitucionDia } from '../../institucion-dia/entity/institucion-dia.entity';
|
||||
|
||||
@Entity()
|
||||
export class HoraExcepcion {
|
||||
|
@ -1,37 +1,37 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
OneToMany,
|
||||
ManyToOne,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { Institucion } from '../institucion/entity/institucion.entity';
|
||||
import { Dia } from '../dia/entity/dia.entity';
|
||||
import { HoraExcepcion } from '../hora-excepcion/entity/hora-excepcion.entity';
|
||||
import { Dia } from '../../dia/entity/dia.entity';
|
||||
import { HoraExcepcion } from '../../hora-excepcion/entity/hora-excepcion.entity';
|
||||
import { Institucion } from '../../institucion/entity/institucion.entity';
|
||||
|
||||
@Entity()
|
||||
export class InstitucionDia {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_institucion_dia: number;
|
||||
|
||||
@Column()
|
||||
hora_inicio: Date;
|
||||
|
||||
@Column()
|
||||
hora_fin: Date;
|
||||
|
||||
@Column()
|
||||
@Column({ type: Boolean, nullable: false, default: false })
|
||||
activo: boolean;
|
||||
|
||||
@ManyToOne(() => Institucion, (institucion) => institucion.institucionDias)
|
||||
@JoinColumn({ name: 'id_institucion' })
|
||||
institucion: Institucion;
|
||||
@Column({ type: Date, nullable: false })
|
||||
hora_fin: Date;
|
||||
|
||||
@Column({ type: Date, nullable: false })
|
||||
hora_inicio: Date;
|
||||
|
||||
@ManyToOne(() => Dia, (dia) => dia.institucionesDias)
|
||||
@JoinColumn({ name: 'id_dia' })
|
||||
dia: Dia;
|
||||
|
||||
@ManyToOne(() => Institucion, (institucion) => institucion.institucionDias)
|
||||
@JoinColumn({ name: 'id_institucion' })
|
||||
institucion: Institucion;
|
||||
|
||||
@OneToMany(
|
||||
() => HoraExcepcion,
|
||||
(horaExcepcion) => horaExcepcion.institucionDia,
|
@ -1,7 +1,13 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller, Get, Put } from '@nestjs/common';
|
||||
import { InstitucionDiaService } from './institucion-dia.service';
|
||||
|
||||
@Controller('institucion-dia')
|
||||
export class InstitucionDiaController {
|
||||
constructor(private institucionDiaService: InstitucionDiaService) {}
|
||||
|
||||
@Get()
|
||||
get() {}
|
||||
|
||||
@Put()
|
||||
update() {}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
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';
|
||||
import { InstitucionDia } from './entity/institucion-dia.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([InstitucionDia])],
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InstitucionDia } from './institucion-dia.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InstitucionDia } from './entity/institucion-dia.entity';
|
||||
|
||||
@Injectable()
|
||||
export class InstitucionDiaService {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Carrera } from '../../carrera/entity/carrera.entity';
|
||||
import { InstitucionDia } from '../../institucion-dia/institucion-dia.entity';
|
||||
import { InstitucionDia } from '../../institucion-dia/entity/institucion-dia.entity';
|
||||
import { InstitucionInfraccion } from '../../institucion-infraccion/institucion-infraccion.entity';
|
||||
import { Modulo } from '../../modulo/entity/modulo.entity';
|
||||
import { Operador } from '../../operador/operador.entity';
|
||||
|
Loading…
Reference in New Issue
Block a user