更新功能

This commit is contained in:
李琦
2026-08-14 17:50:37 +08:00
parent 2f5ce02608
commit 19df9f2bfd
9 changed files with 566 additions and 9 deletions

View File

@@ -54,4 +54,9 @@ const (
ConfKeyAIDeepSeekKey = "ai_deepseek_key" // DeepSeek API Key
ConfKeyAIDeepSeekBase = "ai_deepseek_base" // DeepSeek 接口地址
ConfKeyAIDeepSeekModel = "ai_deepseek_model" // DeepSeek 模型名
// 桌面端版本升级配置(后台可改,桌面端启动时与菜单「检查更新…」会拉取)
ConfKeyAppVersion = "app_version" // 桌面端最新版本号(语义化,如 1.0.1
ConfKeyAppDownloadURL = "app_download_url" // 最新安装包下载地址https://...
ConfKeyAppReleaseNotes = "app_release_notes" // 更新说明(一行简短文案,桌面端弹窗展示)
ConfKeyAppForceUpdate = "app_force_update" // 是否强制更新1=强制 0=不强制(强制时桌面端不允许跳过)
)

View File

@@ -23,7 +23,7 @@ type User struct {
Username string `gorm:"size:32;uniqueIndex" json:"username"` // 登录用户名(唯一)
Password string `gorm:"size:100" json:"-"` // bcrypt 密文(不下发给前端)
Nickname string `gorm:"size:32" json:"nickname"` // 昵称
Avatar string `gorm:"size:16" json:"avatar"` // emoji 头像
Avatar string `gorm:"size:16" json:"avatar"` // 头像(像素编码 px:01~px:32
Role int `gorm:"default:2" json:"role"` // 角色1超管 2普通
Points int `gorm:"default:0" json:"points"` // 当前积分余额
TotalPoints int `gorm:"default:0" json:"total_points"` // 历史累计积分(排行榜依据)