This commit is contained in:
2024-08-01 02:44:06 +08:00
parent 1860e3666d
commit a8891902c6
11 changed files with 121 additions and 57 deletions

27
serializers/account.go Normal file
View 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"`
}