zhaoqingang
2025-02-11 699dbde008569e88d7d53da196656b07be1755eb
db/model_rule.go
@@ -17,19 +17,20 @@
   RuleArg struct {
      Alias    string `gorm:"column:alias" json:"alias"`         // 参数的别名
      Name     string `gorm:"column:name" json:"name"`           // 参数名称
      Type     string `gorm:"column:type" json:"type"`           // 参数类型: input, option, range, image
      Type     string `gorm:"column:type" json:"type"`           // 参数类型: input, select, range, image
      Must     bool   `gorm:"column:must" json:"must"`           // 是否必填
      Unit     string `gorm:"column:unit" json:"unit"`           // 单位
      Range    string `gorm:"column:range" json:"range"`         // 值的范围,eg:0,100表示从0到100
      Value    string `gorm:"column:value" json:"value"`         // 参数值
      ValType  string `gorm:"column:val_type" json:"valType"`    // 参数值类型 int, string, bool
      Operator string `gorm:"column:operator" json:"operator"`   // 运算符
      Options  string `gorm:"column:options" json:"options"`     // 选项的备选参数
      Sort     int    `gorm:"column:sort;default:0" json:"sort"` // 参数顺序
   }
   ModelRuleSet struct {
      Alias    string      `json:"alias"`    // 参数的别名
      Type     string      `json:"type"`     // 参数类型: input, option, range, image
      Type     string      `json:"type"`     // 参数类型: input, select, range, image
      Name     string      `json:"name"`     // 参数名称
      Value    interface{} `json:"value"`    // 参数值
      ValType  string      `json:"valType"`  // 值类型