use yml
This commit is contained in:
27
serializers/account.go
Normal file
27
serializers/account.go
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
@Time : 2020/6/28 22:16
|
||||
@Author : xuyiqing
|
||||
@File : users.py
|
||||
*/
|
||||
|
||||
package serializers
|
||||
|
||||
import "go_blog/models"
|
||||
|
||||
type Login struct {
|
||||
Username string `form:"username"; json:"username"`
|
||||
Password string `form:"password"; json:"password"`
|
||||
}
|
||||
|
||||
func (l *Login) GetUser() *models.Account {
|
||||
return &models.Account{
|
||||
Username: l.Username,
|
||||
Password: l.Password,
|
||||
}
|
||||
}
|
||||
|
||||
type Account struct {
|
||||
Username string `form:"username" json:"username"`
|
||||
OldPwd string `form:"oldPwd" json:"oldPwd"`
|
||||
NewPwd string `form:"newPwd"json:"newPwd"`
|
||||
}
|
||||
Reference in New Issue
Block a user