feat: 初始化项目基础架构和核心功能
- 添加项目基础结构:Cargo.toml、.gitignore、设备UID和密钥文件 - 实现前端Vue3项目结构:路由、登录页面、设备管理页面 - 添加核心协议定义(crates/protocol):设备状态、资产、USB事件等 - 实现客户端监控模块:系统状态收集、资产收集 - 实现服务端基础API和插件系统 - 添加数据库迁移脚本:设备管理、资产跟踪、告警系统等 - 实现前端设备状态展示和基本交互 - 添加使用时长统计和水印功能插件
This commit is contained in:
27
migrations/010_plugins_watermark.sql
Normal file
27
migrations/010_plugins_watermark.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- 010_plugins_watermark.sql: Screen Watermark plugin (水印管理)
|
||||
|
||||
CREATE TABLE IF NOT EXISTS watermark_config (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
target_type TEXT NOT NULL DEFAULT 'global' CHECK(target_type IN ('global', 'group', 'device')),
|
||||
target_id TEXT,
|
||||
content TEXT NOT NULL DEFAULT '公司名称 | {username} | {date}',
|
||||
font_size INTEGER NOT NULL DEFAULT 14,
|
||||
opacity REAL NOT NULL DEFAULT 0.15,
|
||||
color TEXT NOT NULL DEFAULT '#808080',
|
||||
angle INTEGER NOT NULL DEFAULT -30,
|
||||
enabled INTEGER NOT NULL DEFAULT 1,
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
-- Plugin enable/disable state per device group
|
||||
CREATE TABLE IF NOT EXISTS plugin_state (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
plugin_name TEXT NOT NULL UNIQUE CHECK(plugin_name IN (
|
||||
'web_filter', 'usage_timer', 'software_blocker',
|
||||
'popup_blocker', 'usb_file_audit', 'watermark'
|
||||
)),
|
||||
enabled INTEGER NOT NULL DEFAULT 0,
|
||||
target_type TEXT NOT NULL DEFAULT 'global',
|
||||
target_id TEXT,
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
Reference in New Issue
Block a user