短报文教学

This commit is contained in:
2026-03-27 17:57:07 +08:00
commit 4da5047bf2
27 changed files with 1073 additions and 0 deletions

24
app/model/BShortMsg.js Normal file
View File

@@ -0,0 +1,24 @@
'use strict';
module.exports = (app) => {
const { INTEGER, CHAR, TEXT, DATE } = app.Sequelize;
const BShortMsg = app.model.define('bshort-msg', {
id: { type: INTEGER(11), 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 BShortMsg;
};

18
app/model/BuserToken.js Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
module.exports = (app) => {
const { INTEGER, CHAR } = app.Sequelize;
const BuserToken = app.model.define('buser-token', {
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
user_uid: CHAR(15),
token: CHAR(64),
},{
freezeTableName: true,
timestamp: false,
createdAt: false,
updatedAt: false,
});
return BuserToken;
};