forked from CIDWA/cedetec_api_nest
77 lines
1.7 KiB
TypeScript
77 lines
1.7 KiB
TypeScript
import { EquipoEvento } from 'src/equipo-evento/entity/equipo_evento.entity';
|
|
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
|
import {
|
|
Column,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
OneToMany,
|
|
PrimaryGeneratedColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity()
|
|
export class Evento {
|
|
@PrimaryGeneratedColumn()
|
|
id_evento: number;
|
|
|
|
@Column({ length: 70, nullable: false })
|
|
nombre: string;
|
|
|
|
@Column({ length: 15, nullable: false })
|
|
tipo_evento: string;
|
|
|
|
@Column({ length: 100, nullable: false })
|
|
organizadores: string;
|
|
|
|
@Column({ length: 30, nullable: true })
|
|
proyecto: string;
|
|
|
|
@Column({ length: 40, nullable: false })
|
|
modalidad: string;
|
|
|
|
@Column({ length: 60, nullable: false })
|
|
lugar: string;
|
|
|
|
@Column({ nullable: false })
|
|
cupo: number;
|
|
|
|
@Column({ length: 300, nullable: false })
|
|
observaciones: string;
|
|
|
|
@Column({ type: 'decimal', precision: 7, scale: 2, nullable: true })
|
|
cuota_inscripcion: number;
|
|
|
|
@Column({ length: 50, nullable: true })
|
|
patrocinador: string;
|
|
|
|
@Column({ length: 40, nullable: true })
|
|
tipo_acreditacion: string;
|
|
|
|
@Column({ length: 200, nullable: false })
|
|
objetivo: string;
|
|
|
|
@Column({ nullable: false, type: 'datetime' })
|
|
fecha_inicio: Date;
|
|
|
|
@Column({ nullable: false, type: 'datetime' })
|
|
fecha_fin: Date;
|
|
|
|
@Column({ nullable: false, type: 'datetime' })
|
|
fecha_limite_inscripcion: Date;
|
|
|
|
@Column({ length: 40, nullable: true })
|
|
horario: string;
|
|
|
|
@Column({ nullable: true })
|
|
estado: boolean;
|
|
|
|
@OneToMany(
|
|
() => EventoParticipante,
|
|
(eventoParticipante) => eventoParticipante.evento,
|
|
)
|
|
eventoParticipantes: EventoParticipante[];
|
|
|
|
@OneToMany(() => EquipoEvento, (equipoEvento) => equipoEvento.evento)
|
|
equipoEvento: EquipoEvento;
|
|
}
|