12345678910111213141516171819202122232425262728293031323334353637383940 |
- package entity
- import "gopkg.in/guregu/null.v3"
- type User struct {
- Id int64 `db:"id"` //编号:w
- Gender int `db:"gender"` //性别
- Mobile string `db:"mobile"` //手机号
- Name string `db:"name"` //昵称
- Age int `db:"age"` //真实姓名
- Password string `db:"password" json:"-"` //用户密码
- PasswordSalt string `db:"password_salt" json:"-"` //密码盐值
- Status int `db:"status"` //用户状态
- CreatedAt string `db:"created_at"` //创建日期
- Extra string `db:"extra"` //普通账户时按需存储,或存储第三方账户信息
- AccountType uint `db:"account_type"` //账户类型
- Avatar string `db:"avatar"`
- IsAcceptProto string `db:"is_accept_up"`
- IsNew bool `json:"is_new"`
- Height int `db:"height"` //身高
- Weight int `db:"weight"` //体重
- BirthDay string `db:"birthday"` //生日
- Hobby string `db:"hobby"` //喜好
- }
- type UserDB struct {
- Id int64 `db:"id"` //编号:w
- Gender null.Int `db:"gender"` //性别
- Mobile string `db:"mobile"` //手机号
- Name null.String `db:"name"` //昵称
- Age null.Int `db:"age"` //真实姓名
- Password string `db:"password" json:"-"` //用户密码
- PasswordSalt string `db:"password_salt" json:"-"` //密码盐值
- Status int `db:"status"` //用户状态
- CreatedAt string `db:"created_at"` //创建日期
- Extra null.String `db:"extra"`
- AccountType uint `db:"account_type"`
- Avatar string `db:"avatar"`
- IsAcceptProto string `db:"is_accept_up"`
- IsNew bool `json:"is_new"`
- }
|