package domain type AutoUpdateConfigOption struct { Id string `bson:"_id" json:"id"` // "options" Packages AutoUpdatePackagesOption `bson:"packages" json:"packages"` // 升级包总表 key = fileName AGateVersions []string `bson:"aGateVersions" json:"aGateVersions"` // aGate 版本表 } type AutoUpdatePackagesOption struct { System []string `bson:"system" json:"system"` // 系统包 AGate []string `bson:"aGate" json:"aGate"` // aGate包 SubDevice []string `bson:"subDevice" json:"subDevice"` // 子设备包 Others []string `bson:"others" json:"others"` // 其他包 } type AutoUpdatePackages struct { Id string `bson:"_id" json:"id"` // "软件包名" Title string `bson:"title" json:"title"` // 升级包标题 InvVersion []string `bson:"invVersion" json:"invVersion"` // INV 版本 } type AutoUpdateAPowerVersion struct { Id string `bson:"_id" json:"id"` // aPower硬件版本号 Name string `bson:"name" json:"name"` // aPower名称 Remark string `bson:"remark" json:"remark"` // 备注 } type AutoUpdateConfig struct { Id string `bson:"_id" json:"id"` // "aGate硬件类型" Config AutoUpdateAGateConfig `bson:"config" json:"config"` } type AutoUpdateAGateConfig struct { DefaultType AutoUpdateDefaultTypeConfig `bson:"defaultType" json:"defaultType"` // 默认升级类配置 SpecialType []AutoUpdateSpecialTypeConfig `bson:"specialType" json:"specialType"` // 特殊类型升级配置 (备件换件升级、New Home(休眠)等) } type VersionType interface { uint | string } type AutoUpdateSoftwareVersionInfo[T VersionType] struct { Version T `bson:"version" json:"version"` Remark string `bson:"remark" json:"remark"` } type AutoUpdateDefaultTypeConfig struct { EmsVersions []AutoUpdateSoftwareVersionInfo[string] `bson:"emsVersions" json:"emsVersions"` // 符合条件的 EMS 软件版本表 APowerVersions []string `bson:"aPowerVersions" json:"aPowerVersions"` // 符合条件的 aPower 硬件版本表 UpdateOrder []string `bson:"updateOrder" json:"updateOrder"` // 升级步骤 } type AutoUpdateSpecialTypeConfig struct { Id string `bson:"id" json:"id"` // 数据唯一ID Title string `bson:"title" json:"title"` // 特殊配置标题(说明) EmsVersions []AutoUpdateSoftwareVersionInfo[string] `bson:"emsVersions" json:"emsVersions"` // 符合条件的 EMS 软件版本表 APowerVersions []string `bson:"aPowerVersions" json:"aPowerVersions"` // 符合条件的 aPower 硬件版本表 SpecialUpdateOrder []string `bson:"specialUpdateOrder" json:"specialUpdateOrder"` // 特殊升级步骤 (如果使能 UseDefaultUpdate 则为前置升级步骤, 否则覆盖 updateOrder) UseDefaultUpdate bool `bson:"useDefaultUpdate" json:"useDefaultUpdate"` // 追加标准升级步骤 }