user.go


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"`
}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值