北斗导航定位通信综合实践赛服务系统
This commit is contained in:
24
app/model4/Account.js
Normal file
24
app/model4/Account.js
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const Account = app.model4.define('account', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
uid: CHAR(15),
|
||||
salt: CHAR(24),
|
||||
contest_uid: CHAR(15),
|
||||
account_name: STRING(20),
|
||||
password: CHAR(64),
|
||||
status: INTEGER(3),
|
||||
created_at: DATE,
|
||||
login_status: INTEGER(3),
|
||||
},{
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: false,
|
||||
});
|
||||
|
||||
return Account;
|
||||
};
|
||||
22
app/model4/ChoiceTopic.js
Normal file
22
app/model4/ChoiceTopic.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const ChoiceTopic = app.model4.define('choice-topic', {
|
||||
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
|
||||
topic: STRING(300),
|
||||
options_a: STRING(300),
|
||||
options_b: STRING(300),
|
||||
options_c: STRING(300),
|
||||
options_d: STRING(300),
|
||||
answer: CHAR(1),
|
||||
},{
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false,
|
||||
});
|
||||
|
||||
return ChoiceTopic;
|
||||
};
|
||||
29
app/model4/Contest.js
Normal file
29
app/model4/Contest.js
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const Contest = app.model4.define('contest', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
uid: CHAR(15),
|
||||
contest_name: STRING(50),
|
||||
contest_organizers: STRING(50),
|
||||
contest_term: STRING(5),
|
||||
type: INTEGER(3),
|
||||
status: INTEGER(3),
|
||||
online_start: DATE,
|
||||
online_end: DATE,
|
||||
offline_start: DATE,
|
||||
offline_end: DATE,
|
||||
contest_start: DATE,
|
||||
contest_end: DATE,
|
||||
created_at: DATE,
|
||||
},{
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: false,
|
||||
});
|
||||
|
||||
return Contest;
|
||||
};
|
||||
34
app/model4/Examination.js
Normal file
34
app/model4/Examination.js
Normal file
@@ -0,0 +1,34 @@
|
||||
'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;
|
||||
};
|
||||
24
app/model4/TShortMsg.js
Normal file
24
app/model4/TShortMsg.js
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, TEXT, DATE } = app.Sequelize;
|
||||
|
||||
const TShortMsg = app.model4.define('tshort-msg', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
card_id: CHAR(8),
|
||||
receiver_address: CHAR(8),
|
||||
original_msg: TEXT,
|
||||
send_type: INTEGER(1),
|
||||
encode_type: INTEGER(1),
|
||||
msg_data: TEXT,
|
||||
created_at: DATE,
|
||||
},{
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: false,
|
||||
});
|
||||
|
||||
return TShortMsg;
|
||||
};
|
||||
18
app/model4/TuserBind.js
Normal file
18
app/model4/TuserBind.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR } = app.Sequelize;
|
||||
|
||||
const TuserBind = app.model4.define('tuser-bind', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
card_id: CHAR(8),
|
||||
user_uid: CHAR(15),
|
||||
},{
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false,
|
||||
});
|
||||
|
||||
return TuserBind;
|
||||
};
|
||||
Reference in New Issue
Block a user