refactor(ota): 移除 OTA 相关冗余字段及清理代码
- 从 OTA 结构体中删除 pawVerCode、pawVerName、pawUrl、pawMd5 字段 - 更新数据库查询,去除对上述字段的扫描 - 调整 SQL 迁移脚本,删除对应的数据库列 - 简化相关存储库方法的查询逻辑,提升代码维护性
This commit is contained in:
+14
-18
@@ -28,24 +28,20 @@ var _ sql.Scanner = (*BoolInt)(nil)
|
||||
|
||||
// OTA 固件升级记录
|
||||
type OTA struct {
|
||||
ID int `json:"-"`
|
||||
VerCode int `json:"verCode"`
|
||||
VerName string `json:"verName"`
|
||||
URL string `json:"url"`
|
||||
MD5 string `json:"md5"`
|
||||
Force BoolInt `json:"force"`
|
||||
Desc *string `json:"desc,omitempty"`
|
||||
Model *string `json:"model,omitempty"`
|
||||
HW int `json:"hw"`
|
||||
Target BoolInt `json:"target"`
|
||||
Beta BoolInt `json:"beta"`
|
||||
PawVerCode int `json:"-"`
|
||||
PawVerName string `json:"-"`
|
||||
PawURL string `json:"-"`
|
||||
PawMD5 string `json:"-"`
|
||||
StartTime *time.Time `json:"startTime,omitempty"`
|
||||
EndTime *time.Time `json:"endTime,omitempty"`
|
||||
Status int `json:"-"`
|
||||
ID int `json:"-"`
|
||||
VerCode int `json:"verCode"`
|
||||
VerName string `json:"verName"`
|
||||
URL string `json:"url"`
|
||||
MD5 string `json:"md5"`
|
||||
Force BoolInt `json:"force"`
|
||||
Desc *string `json:"desc,omitempty"`
|
||||
Model *string `json:"model,omitempty"`
|
||||
HW int `json:"hw"`
|
||||
Target BoolInt `json:"target"`
|
||||
Beta BoolInt `json:"beta"`
|
||||
StartTime *time.Time `json:"startTime,omitempty"`
|
||||
EndTime *time.Time `json:"endTime,omitempty"`
|
||||
Status int `json:"-"`
|
||||
}
|
||||
|
||||
// BlackList OTA 黑名单
|
||||
|
||||
Reference in New Issue
Block a user