| | |
| | | type Tool struct { |
| | | ID uint `gorm:"primaryKey" json:"id"` |
| | | Name string `gorm:"size:100" json:"name"` |
| | | Size string `gorm:"size:20" json:"size"` |
| | | Size string `gorm:"size:20" json:"size"` // 展示用大小,如 85.2MB |
| | | Cover string `gorm:"size:255" json:"cover"` |
| | | Description string `gorm:"size:500" json:"description"` |
| | | FileURL string `gorm:"size:255" json:"file_url"` |
| | | FileURL string `gorm:"size:255" json:"file_url"` // 下载压缩包URL |
| | | LaunchExe string `gorm:"size:255" json:"launch_exe"` // 启动程序相对路径(相对解压后目录) |
| | | CreatedAt time.Time `json:"created_at"` |
| | | } |
| | | |
| | |
| | | Content string `gorm:"type:text" json:"content"` |
| | | CreatedAt time.Time `json:"created_at"` |
| | | } |
| | | |
| | | // PasswordResetRequest 用户找回密码申请(客户端提交,管理员在后台同意并重置) |
| | | type PasswordResetRequest struct { |
| | | ID uint `gorm:"primaryKey" json:"id"` |
| | | Phone string `gorm:"size:20;index" json:"phone"` |
| | | ProposedPwd string `gorm:"size:20" json:"proposed_password"` // 用户期望的新密码(管理员同意后默认采用) |
| | | Status int `gorm:"default:0" json:"status"` // 0待处理 1已同意 |
| | | NewPwd string `gorm:"size:20" json:"new_password"` // 同意时实际设置的新密码(明文,便于管理员告知用户) |
| | | HandledAt *time.Time `json:"handled_at"` |
| | | CreatedAt time.Time `json:"created_at"` |
| | | } |
| | | |
| | | // ClientVersion 客户端版本(管理后台上传,下载页展示最新版供用户下载) |
| | | type ClientVersion struct { |
| | | ID uint `gorm:"primaryKey" json:"id"` |
| | | Version string `gorm:"size:50" json:"version"` // 版本号,如 1.0.0 |
| | | Notes string `gorm:"size:1000" json:"notes"` // 更新说明 |
| | | FileURL string `gorm:"size:255" json:"file_url"` // 安装包URL(zip) |
| | | FileSize string `gorm:"size:20" json:"file_size"` // 展示大小,如 30.6 MB |
| | | DownloadCount int `json:"download_count"` |
| | | CreatedAt time.Time `json:"created_at"` |
| | | } |