business.conf.go 879 B

12345678910111213141516171819
  1. package business_conf
  2. import (
  3. "time"
  4. )
  5. type BusinessConf struct {
  6. Id int `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL" json:"id"`
  7. ConfKey string `gorm:"column:conf_key;default:;NOT NULL;comment:'配置Key'" json:"conf_key"`
  8. ConfVal string `gorm:"column:conf_val;comment:'配置值'" json:"conf_val"`
  9. ValType int `gorm:"column:val_type;default:0;NOT NULL;comment:'1-字符串;2-数值;3-数组;4-富文本;'" json:"val_type"`
  10. Necessary int `gorm:"column:necessary;default:0;NOT NULL;comment:'是否必填:0-否;1-是'" json:"necessary"`
  11. Remark string `gorm:"column:remark;default:;NOT NULL;comment:'备注'" json:"remark"`
  12. CreateTime time.Time `gorm:"column:create_time;default:NULL;comment:'创建时间'" json:"create_time"`
  13. }
  14. func (b *BusinessConf) TableName() string {
  15. return "business_conf"
  16. }