Handlers, DB, Cache
This commit is contained in:
20
internal/models/user.go
Normal file
20
internal/models/user.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
type UserRegister struct {
|
||||
TIN string `json:"tin"`
|
||||
Phone string `json:"phone"`
|
||||
Passwd string `json:"password,omitempty"`
|
||||
PasswdCfm string `json:"password_cfm,omitempty"`
|
||||
PasswdHash string `json:"-"`
|
||||
}
|
||||
|
||||
type UserLoginReq struct {
|
||||
Phone string `json:"phone"`
|
||||
Passwd string `json:"password"`
|
||||
PasswdHash string `json:"-"`
|
||||
}
|
||||
|
||||
type UserLoginResp struct {
|
||||
Token string `json:"token"`
|
||||
TokenTtl int64 `json:"token_ttl"`
|
||||
}
|
||||
Reference in New Issue
Block a user