Files
2025-08-09 18:52:17 -06:00

55 lines
1.2 KiB
JavaScript

// db/tablas/AlumnoInscrito.js
const { DataTypes } = require('sequelize');
const sequelize = require('../../config/sequelize.conf');
const AlumnoInscrito = sequelize.define('AlumnoInscrito', {
id_alumno_inscrito: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false,
},
fecha_inscripcion: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW,
},
tiempo_disponible: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 3600,
},
realizo_pago: {
type: DataTypes.BOOLEAN, // tinyint(1) mapea a booleano
allowNull: false,
defaultValue: false,
},
platica: {
type: DataTypes.BOOLEAN, // bit(1)
allowNull: false,
defaultValue: false,
},
id_cuenta: {
type: DataTypes.STRING(9), // int(9) zerofill → string para mantener ceros a la izquierda
allowNull: false,
},
id_periodo: {
type: DataTypes.INTEGER,
allowNull: false,
},
id_plataforma: {
type: DataTypes.INTEGER,
allowNull: false,
},
ad: {
type: DataTypes.BOOLEAN, // bit(1)
allowNull: true,
defaultValue: false,
},
}, {
tableName: 'alumno_inscrito',
timestamps: false,
});
module.exports = AlumnoInscrito;