user 修改
This commit is contained in:
1
business/model/app.go
Normal file
1
business/model/app.go
Normal file
@@ -0,0 +1 @@
|
||||
package model
|
||||
@@ -46,7 +46,7 @@ type User struct {
|
||||
Avatar string `orm:"size(255)" json:"avatar" compact:"avatar"` // 头像
|
||||
Status int8 `json:"status" compact:"status"`
|
||||
Type int8 `json:"type" compact:"type"` // 用户类型
|
||||
|
||||
Company string `json:"company"` //公司名称
|
||||
CityCode int `orm:"default(0)" json:"cityCode"`
|
||||
DistrictCode int `orm:"default(0);index" json:"districtCode"`
|
||||
Address string `orm:"size(255)" json:"address"`
|
||||
@@ -57,11 +57,6 @@ type User struct {
|
||||
LastLoginAt *time.Time `orm:"null" json:"lastLoginAt"`
|
||||
LastLoginIP string `orm:"size(64);column(last_login_ip)" json:"lastLoginIP"`
|
||||
LastLoginType string `orm:"size(16)" json:"lastLoginType"`
|
||||
PopCode string `json:"popCode"` //推广码
|
||||
PopUser string `json:"popUser"` //推广人
|
||||
PopCount int `json:"popCount"` //推荐人数
|
||||
PopFlag int `json:"popFlag"` //是否已通过推荐获得免费会员
|
||||
PopedFlag int `json:"popedFlag"` //被邀请标志(弹框)
|
||||
}
|
||||
|
||||
func (*User) TableUnique() [][]string {
|
||||
|
||||
@@ -12,6 +12,8 @@ func Init() {
|
||||
// orm.RegisterDataBase("c4", "mysql", "root:WebServer@1@tcp(gold1.jxc4.com:3306)/jxd_dev_0?charset=utf8mb4&loc=Local&parseTime=true", 30)
|
||||
|
||||
orm.RegisterModel(&model.NewConfig{})
|
||||
orm.RegisterModel(&model.User{})
|
||||
orm.RegisterModel(&model.Place{})
|
||||
// create table
|
||||
orm.RunSyncdb("default", false, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user