ntrip-caster服务后端
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;
|
||||
};
|
||||
19
app/model4/TNtripAdmin.js
Normal file
19
app/model4/TNtripAdmin.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const TNtripAdmin = app.model4.define('tntrip-admin', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
password: STRING(16)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return TNtripAdmin;
|
||||
};
|
||||
19
app/model4/TNtripClient.js
Normal file
19
app/model4/TNtripClient.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const TNtripClient = app.model.define('tntrip-client', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
base: STRING(104)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return TNtripClient;
|
||||
};
|
||||
20
app/model4/TNtripMsg.js
Normal file
20
app/model4/TNtripMsg.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize;
|
||||
|
||||
const TNtripMsg = app.model4.define('tntrip-msg', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
original_msg: TEXT,
|
||||
created_at: DATE
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return TNtripMsg;
|
||||
};
|
||||
21
app/model4/TNtripRecord.js
Normal file
21
app/model4/TNtripRecord.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const TNtripRecord = app.model4.define('tntrip-record', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
befor_edit: STRING(100),
|
||||
created_at: DATE,
|
||||
updated_at: DATE
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
});
|
||||
|
||||
return TNtripRecord;
|
||||
};
|
||||
Reference in New Issue
Block a user