zhangqian
2024-07-04 c950586b718ae6fc198bedf424609a4ac94cb5d1
models/file_template_attachment.go
@@ -10,10 +10,9 @@
type (
   FileTemplateAttachment struct {
      WmsModel
      Id          int                           `json:"id"  gorm:"column:id;primary_key;AUTO_INCREMENT"`
      Category    constvar.FileTemplateCategory `json:"category" gorm:"type:int(11);comment:模版种类"`
      WarehouseId int                           `json:"warehouseId" gorm:"type:int(11);comment:仓库id"`
      Name        string                        `json:"name" gorm:"type:varchar(63);comment:模版名称"`
      Id       int                           `json:"id"  gorm:"column:id;primary_key;AUTO_INCREMENT"`
      Category constvar.FileTemplateCategory `json:"category" gorm:"type:int(11);comment:模版种类"`
      Name     string                        `json:"name" gorm:"type:varchar(63);comment:模版名称"`
      //AttachmentId uint                          `json:"attachmentId" gorm:"comment:附件表外键"`
      //Attachment   Attachment                    `json:"attachment" gorm:"foreignKey:AttachmentId;references:Id"`
      TableInfo string `json:"tableInfo" gorm:"type:varchar(31);comment:表名"`
@@ -52,10 +51,6 @@
   slf.Order = order
   return slf
}
func (slf *FileTemplateAttachmentSearch) SetWarehouseId(warehouseId int) *FileTemplateAttachmentSearch {
   slf.WarehouseId = warehouseId
   return slf
}
func (slf *FileTemplateAttachmentSearch) SetID(id int) *FileTemplateAttachmentSearch {
   slf.Id = id
@@ -82,9 +77,6 @@
   if slf.Id != 0 {
      db = db.Where("id = ?", slf.Id)
   }
   if slf.WarehouseId != 0 {
      db = db.Where("warehouse_id = ?", slf.Id)
   }
   if slf.Order != "" {
      db = db.Order(slf.Order)