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