Files
cedetec_api_nest/src/participante/participante.entity.ts
T
2023-03-06 21:55:25 -06:00

45 lines
1005 B
TypeScript

import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
@Entity()
export class Participante {
@PrimaryGeneratedColumn()
id_participante: number;
@Column({ type: String, nullable: false, length: 100 })
nombre: string;
@Column({ nullable: false })
apellido_paterno: string;
@Column({ nullable: false })
apellido_materno: string;
@Column({ nullable: true })
telefono: string;
@Column({ nullable: false })
email: string;
@Column({ nullable: true }) //
password: string;
@Column({ nullable: true }) //
tipo: string;
@Column({ nullable: true }) //
estado: string;
@Column({ nullable: true })
institucion_procedencia: string;
@Column({ nullable: true })
carrera: string;
@OneToMany(
() => EventoParticipante,
(eventoParticipante) => eventoParticipante.participante,
)
eventosParticipante: EventoParticipante[];
}