ntrip-caster服务后端
This commit is contained in:
19
app/model2/CNtripAdmin.js
Normal file
19
app/model2/CNtripAdmin.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const CNtripAdmin = app.model2.define('cntrip-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 CNtripAdmin;
|
||||
};
|
||||
19
app/model2/CNtripClient.js
Normal file
19
app/model2/CNtripClient.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING } = app.Sequelize;
|
||||
|
||||
const CNtripClient = app.model.define('cntrip-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 CNtripClient;
|
||||
};
|
||||
20
app/model2/CNtripMsg.js
Normal file
20
app/model2/CNtripMsg.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize;
|
||||
|
||||
const CNtripMsg = app.model2.define('cntrip-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 CNtripMsg;
|
||||
};
|
||||
21
app/model2/CNtripRecord.js
Normal file
21
app/model2/CNtripRecord.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const CNtripRecord = app.model2.define('cntrip-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 CNtripRecord;
|
||||
};
|
||||
34
app/model2/CSide.js
Normal file
34
app/model2/CSide.js
Normal file
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (app) => {
|
||||
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
|
||||
|
||||
const CSide = app.model2.define('c-side', {
|
||||
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
|
||||
uid: CHAR(15),
|
||||
salt: CHAR(24),
|
||||
status: INTEGER(3),
|
||||
role: INTEGER(3),
|
||||
avatar: CHAR(15),
|
||||
account_name: STRING(20),
|
||||
password: CHAR(64),
|
||||
user_name: STRING(20),
|
||||
phone: CHAR(11),
|
||||
gender: INTEGER(1),
|
||||
age: INTEGER(3),
|
||||
email: STRING(254),
|
||||
address: STRING(300),
|
||||
post_code: CHAR(6),
|
||||
created_at: DATE,
|
||||
updated_at: DATE,
|
||||
login_at: DATE,
|
||||
login_status: INTEGER(3)
|
||||
}, {
|
||||
freezeTableName: true,
|
||||
timestamp: true,
|
||||
createdAt: true,
|
||||
updatedAt: true
|
||||
});
|
||||
|
||||
return CSide;
|
||||
};
|
||||
Reference in New Issue
Block a user