Files
mayfly-go/server/internal/sys/api/form/account.go

21 lines
687 B
Go
Raw Normal View History

package form
type AccountCreateForm struct {
2023-06-11 19:59:35 +08:00
Id uint64 `json:"id"`
2023-08-04 12:22:21 +08:00
Name string `json:"name" binding:"required,max=16" msg:"required=姓名不能为空,max=姓名最大长度不能超过16位"`
Username string `json:"username" binding:"pattern=account_username"`
Password string `json:"password"`
}
type AccountUpdateForm struct {
2023-07-24 22:36:07 +08:00
Name string `json:"name" binding:"max=16"` // 姓名
Username string `json:"username" binding:"omitempty,pattern=account_username"`
2023-07-24 22:36:07 +08:00
Password *string `json:"password"`
}
type AccountChangePasswordForm struct {
Username string `json:"username"`
OldPassword string `json:"oldPassword"`
NewPassword string `json:"newPassword"`
}