feat: 新增四小时核销批次撤回审计与定时备份管理页
Deploy to Server / deploy (push) Successful in 1m57s

This commit is contained in:
Trae Assistant
2026-10-07 01:04:55 +08:00
parent ef73970930
commit b99cfa4d9f
11 changed files with 1323 additions and 11 deletions
+23
View File
@@ -56,3 +56,26 @@ CREATE TABLE IF NOT EXISTS admins (
password_hash TEXT NOT NULL,
created_at TEXT NOT NULL DEFAULT (datetime('now','+8 hours'))
);
CREATE TABLE IF NOT EXISTS four_hour_exports (
id INTEGER PRIMARY KEY AUTOINCREMENT,
status TEXT NOT NULL DEFAULT 'active',
admin_username TEXT,
eligible_count INTEGER NOT NULL DEFAULT 0,
eligible_hours_total REAL NOT NULL DEFAULT 0,
items_updated INTEGER NOT NULL DEFAULT 0,
plan_json TEXT,
note TEXT,
created_at TEXT NOT NULL DEFAULT (datetime('now','+8 hours')),
voided_at TEXT
);
CREATE TABLE IF NOT EXISTS four_hour_export_items (
id INTEGER PRIMARY KEY AUTOINCREMENT,
export_id INTEGER NOT NULL,
hour_id INTEGER NOT NULL,
delta REAL NOT NULL,
FOREIGN KEY (export_id) REFERENCES four_hour_exports(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS idx_fhe_items_export ON four_hour_export_items(export_id);
CREATE INDEX IF NOT EXISTS idx_fhe_items_hour ON four_hour_export_items(hour_id);