endpoint de escolares, login e inscripcion

This commit is contained in:
Andres2908
2022-01-27 00:15:05 -06:00
parent 99652f15e5
commit cbd51968a1
7 changed files with 114 additions and 64 deletions
+7 -7
View File
@@ -69,12 +69,12 @@ Inscripcion.belongsTo(Area, {
},
});
Inscripcion.belongsTo(FechaInscripcion, {
foreignKey: {
name: 'idFechaInscripcion',
type: DataTypes.INTEGER,
allowNull: false,
},
});
// Inscripcion.belongsTo(FechaInscripcion, {
// foreignKey: {
// name: 'idFechaInscripcion',
// type: DataTypes.INTEGER,
// allowNull: false,
// },
// });
module.exports = Inscripcion;
+15 -11
View File
@@ -17,15 +17,19 @@ Usuario.init(
allowNull: false,
unique: true,
},
semestre: {
type: DataTypes.STRING(30),
allowNull: false,
},
nombre: {
type: DataTypes.STRING(70),
allowNull: true,
defaultValue: null,
},
semestre: {
type: DataTypes.STRING(30),
allowNull: false,
},
carrera: {
type: DataTypes.STRING(60),
allowNull: false,
},
},
{
sequelize,
@@ -35,12 +39,12 @@ Usuario.init(
}
);
Usuario.belongsTo(Carrera, {
foreignKey: {
name: 'idCarrera',
type: DataTypes.INTEGER,
allowNull: false,
},
});
// Usuario.belongsTo(Carrera, {
// foreignKey: {
// name: 'idCarrera',
// type: DataTypes.INTEGER,
// allowNull: false,
// },
// });
module.exports = Usuario;