bc5ddb29c7
- Introduced TipoEvento entity with enum for event types. - Created DTOs for creating and updating TipoEvento. - Implemented TipoEvento service with methods for CRUD operations and seeding initial data. - Added TipoEvento controller for handling HTTP requests related to event types. - Integrated TipoEvento into the main application module. - Updated Evento entity to include a relationship with TipoEvento. - Enhanced ParticipanteEvento service to register attendance using QR tokens. - Implemented QR token generation and validation for event attendance. - Updated API documentation for new endpoints and functionalities. - Adjusted TypeOrm configuration to include new entities.
31 lines
598 B
TypeScript
31 lines
598 B
TypeScript
import { TipoUser } from 'src/tipo_user/entities/tipo_user.entity';
|
|
import {
|
|
Column,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('administrador')
|
|
export class Administrador {
|
|
@PrimaryGeneratedColumn()
|
|
id_administrador: number;
|
|
|
|
@Column({ unique: true })
|
|
nombre_usuario: string;
|
|
|
|
@Column({ unique: true })
|
|
correo: string;
|
|
|
|
@Column()
|
|
password: string;
|
|
|
|
@Column({ type: 'int' })
|
|
id_tipo_user: number;
|
|
|
|
@ManyToOne(() => TipoUser, (tipoUser) => tipoUser.administrador)
|
|
@JoinColumn({ name: 'id_tipo_user' })
|
|
tipoUser: TipoUser;
|
|
}
|