module.exports = (sequelize, type) => { const Certificate = sequelize.define('certificate', { id: { type: type.INTEGER, primaryKey: true, autoIncrement: true }, certificate_name: { type: type.STRING, unique: { args: true, msg: 'Oops. Looks like certificate already exist.' } }, short_name: type.STRING, live_course_thumbnail: type.TEXT, live_welcome_thumbnail: type.TEXT, live_welcome_video: type.TEXT, self_course_thumbnail: type.TEXT, self_welcome_thumbnail: type.TEXT, self_welcome_video: type.TEXT, hybrid_course_thumbnail: type.TEXT, hybrid_welcome_thumbnail: type.TEXT, hybrid_welcome_video: type.TEXT, 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, domain_sequence: type.TEXT, status: { type: type.INTEGER, defaultValue: '0' } }) return Certificate; }