57 lines
1.5 KiB
JavaScript
57 lines
1.5 KiB
JavaScript
module.exports = (sequelize, type) => {
|
|
const PracticeAppLastAns = sequelize.define('practiceapp_lastans', {
|
|
id: {
|
|
type: type.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
user_id: type.INTEGER,
|
|
domain_id: type.INTEGER,
|
|
que: type.INTEGER,
|
|
answer: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () {
|
|
return this.getDataValue('answer')
|
|
}
|
|
},
|
|
correct: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () {
|
|
return this.getDataValue('correct')
|
|
}
|
|
},
|
|
isreview: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () {
|
|
return this.getDataValue('isreview')
|
|
}
|
|
},
|
|
timestamp: type.TEXT,
|
|
status: {
|
|
type: type.INTEGER,
|
|
defaultValue: 0
|
|
},
|
|
cohort_id: {
|
|
type: type.INTEGER,
|
|
defaultValue: 0
|
|
},
|
|
canswer: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () {
|
|
return this.getDataValue('answer')
|
|
}
|
|
},
|
|
ccorrect: {
|
|
type: type.TEXT,
|
|
allowNull: true,
|
|
get: function () {
|
|
return this.getDataValue('correct')
|
|
}
|
|
},
|
|
})
|
|
return PracticeAppLastAns;
|
|
} |