classify_visible.go 613 B

1234567891011121314151617181920212223
  1. package models
  2. import (
  3. "eta_gn/eta_report/global"
  4. "time"
  5. )
  6. type ClassifyVisible struct {
  7. ClassifyVisibleId int `gorm:"column:classify_visible_id;primary_key"`
  8. ClassifyId int `gorm:"column:classify_id"`
  9. AdminId int `gorm:"column:admin_id"`
  10. CreateTime time.Time `gorm:"column:create_time"`
  11. }
  12. func (ClassifyVisible) TableName() string {
  13. return "classify_visible"
  14. }
  15. func (c *ClassifyVisible) GetClassifyVisibleAll() (items []*ClassifyVisible, err error) {
  16. sql := "SELECT * FROM classify_visible"
  17. err = global.DEFAULT_DmSQL.Raw(sql).Find(&items).Error
  18. return
  19. }