update
This commit is contained in:
19
models/AcademicYear.js
Normal file
19
models/AcademicYear.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const { sequelize } = require('../config/database');
|
||||
|
||||
const AcademicYear = sequelize.define('academic_years', {
|
||||
id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true },
|
||||
year_name: { type: DataTypes.STRING(50), allowNull: false },
|
||||
start_date: { type: DataTypes.DATE, allowNull: false },
|
||||
end_date: { type: DataTypes.DATE, allowNull: false },
|
||||
semester_count: { type: DataTypes.INTEGER, defaultValue: 2 },
|
||||
is_current: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
created_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW },
|
||||
updated_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW },
|
||||
}, {
|
||||
tableName: 'academic_years',
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
});
|
||||
|
||||
module.exports = AcademicYear;
|
||||
Reference in New Issue
Block a user