yinbentan
2024-07-16 30e38e3b2a55a4c9d503b7fbda303437865793be
models/dict.go
@@ -8,13 +8,13 @@
)
type (
   // Dict 词典
   // Dict 缫丝词典
   Dict struct {
      gorm.Model
      DictType *constvar.DictType `gorm:"index;type:tinyint(3);not null;comment:字典类型"`         //字典类型
      Number   string             `gorm:"type:varchar(255);not null;comment:编号" json:"number"` //编号
      Name     string             `gorm:"type:varchar(255);not null;comment:名称" json:"name"`   //名称
      Remark   string             `gorm:"type:varchar(255);not null;comment:备注" json:"remark"` //备注
      DictType constvar.DictType `gorm:"index;type:tinyint(3);not null;comment:字典类型"`         //字典类型
      Number   string            `gorm:"type:varchar(255);not null;comment:编号" json:"number"` //编号
      Name     string            `gorm:"type:varchar(255);not null;comment:名称" json:"name"`   //名称
      Remark   string            `gorm:"type:varchar(255);not null;comment:备注" json:"remark"` //备注
   }
   DictSearch struct {
@@ -71,7 +71,7 @@
   return slf
}
func (slf *DictSearch) SetDictType(dt *constvar.DictType) *DictSearch {
func (slf *DictSearch) SetDictType(dt constvar.DictType) *DictSearch {
   slf.DictType = dt
   return slf
}
@@ -96,7 +96,7 @@
      db = db.Where("number = ?", slf.Number)
   }
   if slf.DictType != nil {
   if slf.DictType > 0 {
      db = db.Where("dict_type = ?", slf.DictType)
   }