update: v5.0

This commit is contained in:
mei
2026-08-13 14:29:10 +08:00
parent 8ee98719ef
commit 1271627ef9
8 changed files with 732 additions and 45 deletions
+19
View File
@@ -125,6 +125,25 @@ function initDatabase() {
)
`);
// 设备借用记录表(借用/归还时间由服务器自动记录)
db.exec(`
CREATE TABLE IF NOT EXISTS device_loans (
id TEXT PRIMARY KEY,
device_id TEXT NOT NULL,
device_name TEXT DEFAULT '',
borrower_id TEXT DEFAULT '',
borrower TEXT DEFAULT '',
loan_photo TEXT DEFAULT '',
return_photo TEXT DEFAULT '',
status TEXT DEFAULT '借用中',
loan_time TEXT DEFAULT (datetime('now', 'localtime')),
return_time TEXT DEFAULT '',
remark TEXT DEFAULT '',
created_by TEXT DEFAULT '',
created_at TEXT DEFAULT (datetime('now', 'localtime'))
)
`);
// 账户操作日志表
db.exec(`
CREATE TABLE IF NOT EXISTS user_logs (