ntrip-caster服务后端

This commit is contained in:
2026-05-12 17:43:03 +08:00
commit 6e761f3727
45 changed files with 3125 additions and 0 deletions

24
app/model4/Account.js Normal file
View 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
View 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;
};

View 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
View 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;
};

View 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;
};