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; }