LMS/E-Learning-Backend-main/app/models/Cources.js
2025-09-01 19:37:35 +05:30

30 lines
805 B
JavaScript

module.exports = (sequelize, type) => {
const Cource = sequelize.define('cource', {
id: {
type: type.INTEGER,
primaryKey: true,
autoIncrement: true
},
course_name: {
type: type.STRING,
unique: {
args: true,
msg: 'Oops. Looks like Course already exist.'
}
},
certi_id: type.INTEGER,
short_name: type.STRING,
img_path: type.TEXT,
logo_path: type.TEXT,
days: type.INTEGER,
description: type.STRING,
access: type.STRING,
pass_guarantee: type.ENUM('Free', 'Paid'),
fee: type.STRING,
status: {
type: type.INTEGER,
defaultValue: 0
}
})
return Cource;
}