34 lines
905 B
JavaScript
34 lines
905 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
module.exports = (app) => {
|
||
|
|
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||
|
|
|
||
|
|
const Examination = app.model4.define('examination', {
|
||
|
|
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||
|
|
user_uid: CHAR(15),
|
||
|
|
contest_uid: CHAR(15),
|
||
|
|
exam_type: INTEGER(3),
|
||
|
|
topic_type: INTEGER(3),
|
||
|
|
topic1: STRING(2),
|
||
|
|
topic2: STRING(2),
|
||
|
|
topic3: STRING(50),
|
||
|
|
topic5: STRING(10),
|
||
|
|
answer: STRING(20),
|
||
|
|
answer1: STRING(2),
|
||
|
|
answer2: STRING(2),
|
||
|
|
answer3: STRING(10),
|
||
|
|
answer4: STRING(20),
|
||
|
|
answer5: STRING(10),
|
||
|
|
score: INTEGER(3),
|
||
|
|
score_collection: CHAR(9),
|
||
|
|
created_at: DATE,
|
||
|
|
updated_at: DATE,
|
||
|
|
},{
|
||
|
|
freezeTableName: true,
|
||
|
|
timestamp: true,
|
||
|
|
createdAt: true,
|
||
|
|
updatedAt: true,
|
||
|
|
});
|
||
|
|
|
||
|
|
return Examination;
|
||
|
|
};
|