feat: add settings schema

This commit is contained in:
QiuSW
2026-07-09 00:12:30 +08:00
parent 5aaac0b166
commit 91debb9ad6
24 changed files with 867 additions and 53 deletions
-18
View File
@@ -36,21 +36,3 @@ func defaultHotkeysSQL() string {
}
return sqlhotkeys
}
func defaultAppConfigSQL() string {
return `
INSERT OR IGNORE INTO appconfig (key, type, value, description)
VALUES ('language', 'system', 'zh', '应用语言,支持 zh/en');
INSERT OR IGNORE INTO appconfig (key, type, value, description)
VALUES ('auth.provider', 'system', 'local', '登录 provider,支持 local/remote');
INSERT OR IGNORE INTO appconfig (key, type, value, description)
VALUES ('auth.local.username', 'system', 'admin', '本地演示账号用户名');
INSERT OR IGNORE INTO appconfig (key, type, value, description)
VALUES ('auth.local.password_salt', 'system', 'cmbone-local-auth-v1', '本地演示账号密码盐');
INSERT OR IGNORE INTO appconfig (key, type, value, description)
VALUES ('auth.local.password_hash', 'system', '3e0bfcda604b19fef1f596bcade7469ff1ab8b427fdc998e9a8216101b002f4a', '本地演示账号密码哈希');`
}