category.go 1.1 KB

12345678910111213141516171819202122232425
  1. package main
  2. import (
  3. "database/sql"
  4. "time"
  5. )
  6. type SemCategory struct {
  7. DeletedAt time.Time `gorm:"column:deleted_at" json:"deleted_at" db:"deleted_at"`
  8. Factor float64 `gorm:"column:factor" json:"factor" db:"factor"`
  9. End sql.NullString `gorm:"column:end" json:"end" db:"end"`
  10. UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at" db:"updated_at"`
  11. ChannelID int `gorm:"column:channel_id" json:"channel_id" db:"channel_id"`
  12. Status int `gorm:"column:status" json:"status" db:"status"`
  13. DataType sql.NullInt64 `gorm:"column:data_type" json:"data_type" db:"data_type"`
  14. CreatedAt time.Time `gorm:"column:created_at" json:"created_at" db:"created_at"`
  15. Information sql.NullInt64 `gorm:"column:information" json:"information" db:"information"`
  16. ID int `gorm:"column:id;primary_key" json:"id" db:"id"`
  17. CategoryName string `gorm:"column:category_name" json:"category_name" db:"category_name"`
  18. }
  19. // TableName sets the insert table name for this struct type
  20. func (s *SemCategory) TableName() string {
  21. return "sem_category"
  22. }