Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GENDERS_TEXTS = []string{"男", "女"}
View Source
var GENDERS_VALUES = []string{"male", "female"}
View Source
var ROLES_TEXTS = []string{"管理员", "调度员", "师傅"}
View Source
var ROLES_VALUES = []string{"admin", "operator", "workman"}
Functions ¶
Types ¶
type Address ¶
type AuthIdentity ¶
type AuthInfo ¶
type AuthInfo struct { PhoneVerificationCode string PhoneVerificationCodeExpiry *time.Time PhoneConfirmedAt *time.Time UnconfirmedPhone string // only use when changing phone number EmailConfirmedAt *time.Time UnconfirmedEmail string // only use when changing email SignInCount uint SignLogs []SignLog }
type AvatarImageStorage ¶
type Controller ¶
type Controller struct { }
Controller User Controller
func (Controller) AddCredit ¶
func (Controller) AddCredit(w http.ResponseWriter, req *http.Request)
func (Controller) Orders ¶
func (Controller) Orders(w http.ResponseWriter, req *http.Request)
func (Controller) Profile ¶
func (Controller) Profile(w http.ResponseWriter, req *http.Request)
func (Controller) Update ¶
func (Controller) Update(w http.ResponseWriter, req *http.Request)
type User ¶
type User struct { gorm.Model Email string `form:"email"` Password string Name string `form:"name"` Gender string Role string Birthday *time.Time // 身份证号码 IdentityCardNum string // 手机号码 MobilePhone string // 车牌号码 CarLicencePlateNum string // 车型 东风小货 CarType string // 驾照类型 C1 CarLicenseType string // 是否临时工 IsCasual bool JDAppUser string HireDate *time.Time Balance float32 DefaultBillingAddress uint `form:"default-billing-address"` DefaultShippingAddress uint `form:"default-shipping-address"` Addresses []Address Avatar AvatarImageStorage // Confirm ConfirmToken string Confirmed bool // Recover RecoverToken string RecoverTokenExpiry *time.Time // Accepts AcceptPrivate bool `form:"accept-private"` AcceptLicense bool `form:"accept-license"` AcceptNews bool `form:"accept-news"` }
func (User) AvailableLocales ¶
func (User) DisplayName ¶
type WechatProfile ¶
type WechatProfile struct { gorm.Model Openid string `json:"openid"` Unionid string `json:"unionid"` Nickname string `json:"nickname"` Sex int `json:"sex"` City string `json:"city"` Province string `json:"province"` Country string `json:"country"` Headimgurl string `json:"headimgurl"` MobilePhone string `json:"mobile_phone"` Role string }
WechatProfile 微信资料
Click to show internal directories.
Click to hide internal directories.