ntrip-caster服务后端
This commit is contained in:
20
app/model/BNtripAdmin.js
Normal file
20
app/model/BNtripAdmin.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const BNtripAdmin = app.model.define('bntrip-admin', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
organization: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
password: STRING(16)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return BNtripAdmin;
|
||||
};
|
||||
20
app/model/BNtripClient.js
Normal file
20
app/model/BNtripClient.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const BNtripClient = app.model.define('bntrip-client', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
organization: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
base: STRING(104)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: false,
|
||||
createdAt: false,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return BNtripClient;
|
||||
};
|
||||
21
app/model/BNtripMsg.js
Normal file
21
app/model/BNtripMsg.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize;
|
||||
|
||||
const BNtripMsg = app.model.define('bntrip-msg', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
organization: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
original_msg: TEXT,
|
||||
created_at: DATE
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: false
|
||||
});
|
||||
|
||||
return BNtripMsg;
|
||||
};
|
||||
22
app/model/BNtripRecord.js
Normal file
22
app/model/BNtripRecord.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const BNtripRecord = app.model.define('bntrip-record', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
user_uid: CHAR(15),
|
||||
organization: CHAR(15),
|
||||
mountpoint: STRING(100),
|
||||
befor_edit: STRING(100),
|
||||
created_at: DATE,
|
||||
updated_at: DATE
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
});
|
||||
|
||||
return BNtripRecord;
|
||||
};
|
||||
30
app/model/BSide.js
Normal file
30
app/model/BSide.js
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const BSide = app.model.define('b-side', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
uid: CHAR(15),
|
||||
salt: CHAR(24),
|
||||
status: INTEGER(3),
|
||||
role: INTEGER(3),
|
||||
account_name: STRING(20),
|
||||
password: CHAR(64),
|
||||
organization: CHAR(16),
|
||||
user_name: STRING(20),
|
||||
phone: CHAR(11),
|
||||
msg: STRING(300),
|
||||
created_at: DATE,
|
||||
updated_at: DATE,
|
||||
login_at: DATE,
|
||||
login_status: INTEGER(3)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
});
|
||||
|
||||
return BSide;
|
||||
};
|
||||
Reference in New Issue
Block a user