39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
module.exports = (sequelize, type) => {
|
|
const Ketexamque = sequelize.define('ketexamques', {
|
|
id: {
|
|
type: type.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
certi_id: type.INTEGER,
|
|
test_id: type.INTEGER,
|
|
title: type.TEXT,
|
|
first_choice: type.TEXT,
|
|
second_choice: type.TEXT,
|
|
third_choice: type.TEXT,
|
|
fourth_choice: type.TEXT,
|
|
answer: type.INTEGER,
|
|
type: type.ENUM('VERY SIMPLE', 'SIMPLE', 'AVERAGE', 'ABOVE AVERAGE', 'HARD', 'DIFFICULT', 'TRICKY'),
|
|
d_id: type.INTEGER,
|
|
sd_id: type.INTEGER,
|
|
topic_id: type.INTEGER,
|
|
subtopic_id: type.INTEGER,
|
|
ref_link: type.STRING,
|
|
youtube_link: type.STRING,
|
|
bookpage_no: type.STRING,
|
|
blog_url: type.STRING,
|
|
description: type.TEXT,
|
|
point: type.INTEGER,
|
|
exam_id: {
|
|
type: type.STRING,
|
|
get: function () {
|
|
return this.getDataValue('exam_id').split(',')
|
|
}
|
|
},
|
|
status: {
|
|
type: type.INTEGER,
|
|
defaultValue: 0
|
|
}
|
|
})
|
|
return Ketexamque;
|
|
} |