refactor: 拆分更新类型(全量/补丁)和更新方式(自动/手动),移除force_update字段

This commit is contained in:
2026-05-08 23:34:14 +08:00
parent de0de10b8d
commit 65fa7146e8
12 changed files with 157 additions and 61 deletions
+4 -3
View File
@@ -225,10 +225,9 @@ type Version struct {
FileSize int64 `json:"file_size"`
FileHash string `gorm:"size:64" json:"file_hash"`
EntryFile string `gorm:"size:255" json:"entry_file"`
ForceUpdate bool `gorm:"default:false" json:"force_update"`
UpdateStrategy string `gorm:"size:20;default:optional" json:"update_strategy"`
UpdateMethod string `gorm:"size:20;default:manual" json:"update_method"`
MinVersion string `gorm:"size:50" json:"min_version"`
UpdateType string `gorm:"size:20;default:full" json:"update_type"`
UpdateMethod string `gorm:"size:20;default:auto" json:"update_method"`
Description string `gorm:"type:text" json:"description"`
Changelog string `gorm:"type:text" json:"changelog"`
Status string `gorm:"size:20;default:active" json:"status"`
@@ -236,6 +235,8 @@ type Version struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
ForceUpdate bool `gorm:"default:false" json:"force_update,omitempty"`
MinVersion string `gorm:"size:50" json:"-"`
Application Application `gorm:"foreignKey:ApplicationID" json:"application,omitempty"`
Files []VersionFile `gorm:"foreignKey:VersionID" json:"files,omitempty"`