32 lines
942 B
JavaScript
32 lines
942 B
JavaScript
module.exports = (sequelize, type) => {
|
|
const Liveques = sequelize.define('livequestions', {
|
|
id: {
|
|
type: type.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
question: type.TEXT,
|
|
description: type.TEXT,
|
|
first_choice: type.TEXT,
|
|
second_choice: type.TEXT,
|
|
third_choice: type.TEXT,
|
|
fourth_choice: type.TEXT,
|
|
answer: type.STRING,
|
|
ref_link: type.STRING,
|
|
point: type.INTEGER,
|
|
certi_id: type.INTEGER,
|
|
d_id: type.INTEGER,
|
|
sd_id: type.INTEGER,
|
|
topic_id: type.INTEGER,
|
|
testIds: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () { return this.getDataValue('testIds') ? this.getDataValue('testIds').split(',') : [] }
|
|
},
|
|
status: {
|
|
type: type.INTEGER,
|
|
defaultValue: 0
|
|
}
|
|
})
|
|
return Liveques;
|
|
} |