eta_version_update_log.go 1.2 KB

1234567891011121314151617181920212223242526272829
  1. package crm
  2. import (
  3. "eta/eta_docs/global"
  4. "time"
  5. )
  6. // EtaVersionUpdateLog ETA版本更新日志表
  7. type EtaVersionUpdateLog struct {
  8. Id int `gorm:"primaryKey;column:id;type:int(10) unsigned;not null" json:"id"`
  9. Version string `gorm:"column:version;type:varchar(16);not null;default:''" json:"version"` // 版本号
  10. Content string `gorm:"column:content;type:text" json:"content"` // 更新内容
  11. UpdateDate time.Time `gorm:"column:update_date;type:date" json:"update_date"` // 更新日期
  12. CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"create_time"` // 创建时间
  13. ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modify_time"` // 更新时间
  14. }
  15. func (m *EtaVersionUpdateLog) TableName() string {
  16. return "eta_version_update_log"
  17. }
  18. // GetItemsByCondition 获取列表
  19. func (m *EtaVersionUpdateLog) GetItemsByCondition(condition string, pars []interface{}, orderRule string) (items []*EtaVersionUpdateLog, err error) {
  20. if orderRule == "" {
  21. orderRule = "create_time DESC"
  22. }
  23. err = global.MYSQL["hz_crm"].Where(condition, pars...).Order(orderRule).Find(&items).Error
  24. return
  25. }