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

31 lines
966 B
JavaScript

module.exports = (sequelize, type) => {
const SelfPacedSubscription = sequelize.define('self_paced_subscriptions', {
id: {
type: type.INTEGER,
primaryKey: true,
autoIncrement: true
},
certi_id: type.INTEGER,
price_label: type.TEXT,
features_visible: type.TEXT,
live_events: {
type: type.STRING,
defaultValue: 0,
allowNull: false,
get: function () { return this.getDataValue('live_events').split(',') }
},
only_show_study: type.INTEGER,
cat_exam_attempts: type.INTEGER,
attempts_fee: type.TEXT,
publish_subscription: type.INTEGER,
subscriptions: type.TEXT,
cohort_id: type.INTEGER,
mentor_id: type.INTEGER,
time_zone: type.TEXT,
status: {
type: type.INTEGER,
defaultValue: 0
}
})
return SelfPacedSubscription;
}