package models type User struct { UserId string `json:"username" db:"id"` Username string `json:"username"` Password string `form:"password" json:"password"` Account string `form:"account" json:"account" db:"account"` Addr string `form:"addr" json:"addr"` Createuser string `form:"createuser" json:"createuser"` Area string `form:"area" json:"area"` Descr string `form:"descr" json:"descr"` Email string `form:"email" json:"email"` Fax string `form:"fax" json:"fax"` Idcard string `form:"idcard" json:"idcard"` Isadmin int `form:"isadmin" json:"isadmin" db:"isadmin"` Phone string `form:"phone" json:"phone" db:"phone"` Sex int `form:"sex" json:"sex"` Status int `form:"status" json:"status"` } //通过bonding.json绑定数据 type UserInfo struct { Username string `json:"username"` Account string `json:"account" db:"account"` Addr string `json:"addr"` Createuser string `json:"createuser"` Area int `json:"area"` Descr string `json:"descr"` Email string `json:"email"` Fax string `json:"fax"` Idcard string `json:"idcard"` Isadmin int `json:"isadmin" db:"isadmin"` Phone string `json:"phone" db:"phone"` Sex int `json:"sex"` Status int `json:"status"` } type UserDb struct { Id int64 `db:"id"` Account string `db:"account" redis:"account"` Password string `db:"password" redis:"password"` Isadmin int `db:"isadmin" redis:"isadmin"` Phone string `db:"phone" redis:"phone"` } type UiUser struct { Id string `form:"id" redis:"id" json:"id"` Account string `form:"account" redis:"account" json:"account"` UserName string `form:"userName" redis:"userName" json:"userName"` Password string `form:"password" redis:"password" json:"password"` IsAdmin int `form:"isAdmin" redis:"isAdmin" json:"isAdmin"` Phone string `form:"phone" redis:"phone" json:"phone"` Sex int `form:"sex" redis:"sex" json:"sex"` IdCard string `form:"idCard" redis:"idCard" json:"idCard"` Addr string `form:"addr" redis:"addr" json:"addr"` Area int `form:"area" redis:"area" json:"area"` Descr string `form:"descr" redis:"descr" json:"descr"` Email string `form:"email" redis:"email" json:"email"` Fax string `form:"fax" redis:"fax" json:"fax"` CreateTime string `form:"createTime" redis:"createTime" json:"createTime"` CreateUser string `form:"createUser" redis:"createUser" json:"createUser"` ApiKey string `form:"apiKey" redis:"apiKey" json:"apiKey"` Status int `form:"status" redis:"status" json:"status"` } type UiUserInfo struct { Id string `json:"id"` Account string `json:"account"` UserName string `json:"userName"` IsAdmin int `json:"isAdmin"` Phone string `json:"phone"` Sex int `json:"sex"` IdCard string `json:"idCard"` Addr string `json:"addr"` Area int `json:"area"` Descr string `json:"descr"` Email string `json:"email"` Fax string `json:"fax"` CreateTime string `json:"createTime"` CreateUser string `json:"createUser"` ApiKey string `json:"apiKey"` Status int `json:"status"` } type UiUserDb struct { Id string `db:"id" redis:"id"` Account string `db:"account" redis:"account"` UserName string `db:"userName" redis:"userName"` Password string `db:"password" redis:"password"` IsAdmin int `db:"isAdmin" redis:"isAdmin"` Phone string `db:"phone" redis:"phone"` Sex int `db:"sex" redis:"sex"` IdCard string `db:"idCard" redis:"idCard"` Addr string `db:"addr" redis:"addr"` Area int `db:"area" redis:"area"` Descr string `db:"descr" redis:"descr"` Email string `db:"email" redis:"email"` Fax string `db:"fax" redis:"fax"` CreateTime string `db:"createTime" redis:"createTime"` CreateUser string `db:"createUser" redis:"createUser"` ApiKey string `db:"apiKey" redis:"apiKey"` Status int `db:"status" redis:"status"` } type ChangePwd struct { NewPwd string `form:"newPwd" json:"newPwd"` OldPwd string `form:"newPwd" json:"oldPwd"` }
有疑问加站长微信联系(非本文作者)