enterprise.go 1.6 KB

12345678910111213141516171819202122
  1. package gorm_model
  2. import (
  3. "time"
  4. )
  5. type Enterprise struct {
  6. EnterpriseId int `gorm:"column:enterprise_id;type:int(10) unsigned;primary_key" json:"enterprise_id"` // 企业id
  7. Industry int `gorm:"column:industry;type:tinyint(4)" json:"industry"` // 行业,1-14分别代表能源、化工、材料、机械设备/军工、企业服务/造纸印刷、运输设备、旅游酒店、媒体/信息通信服务、批发/零售、消费品、卫生保健/医疗、金融、建材/建筑/房地产、公共事业
  8. BusinessName string `gorm:"column:business_name;type:varchar(50)" json:"business_name"` // 公司或组织名称
  9. UserId int `gorm:"column:user_id;type:int(11)" json:"user_id"` // 对应用户id
  10. Balance int `gorm:"column:balance;type:int(11)" json:"balance"` // 账户余额
  11. FrozenBalance int `gorm:"column:frozen_balance;type:int(11)" json:"frozen_balance"` // 冻结余额
  12. AvailableBalance int `gorm:"column:available_balance;type:int(11)" json:"available_balance"` // 可用余额
  13. LastLoginTime time.Time `gorm:"column:last_login_time;type:datetime" json:"last_login_time"` // 最后一次登陆时间
  14. CreatedAt time.Time `gorm:"column:created_at;type:datetime;" json:"created_at"` // 创建时间
  15. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"` // 更新时间
  16. }
  17. func (m *Enterprise) TableName() string {
  18. return "enterprise"
  19. }