2021-07-28 18:03:19 +08:00
|
|
|
package form
|
|
|
|
|
|
2025-04-15 21:42:31 +08:00
|
|
|
import "mayfly-go/pkg/model"
|
|
|
|
|
|
2021-07-28 18:03:19 +08:00
|
|
|
type AccountCreateForm struct {
|
2025-04-15 21:42:31 +08:00
|
|
|
model.ExtraData
|
|
|
|
|
|
2023-06-11 19:59:35 +08:00
|
|
|
Id uint64 `json:"id"`
|
2024-11-20 22:43:53 +08:00
|
|
|
Name string `json:"name" binding:"required,max=16" msg:"required=name cannot be blank,max=The maximum length of a name cannot exceed 16 characters"`
|
2023-07-31 17:34:32 +08:00
|
|
|
Username string `json:"username" binding:"pattern=account_username"`
|
2025-04-15 21:42:31 +08:00
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
|
Email string `json:"email" binding:"omitempty,email"`
|
2022-10-29 20:08:15 +08:00
|
|
|
Password string `json:"password"`
|
2021-07-28 18:03:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AccountUpdateForm struct {
|
2025-04-15 21:42:31 +08:00
|
|
|
model.ExtraData
|
|
|
|
|
|
2023-07-24 22:36:07 +08:00
|
|
|
Name string `json:"name" binding:"max=16"` // 姓名
|
2023-07-31 17:34:32 +08:00
|
|
|
Username string `json:"username" binding:"omitempty,pattern=account_username"`
|
2025-04-15 21:42:31 +08:00
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
|
Email string `json:"email" binding:"omitempty,email"`
|
2023-07-24 22:36:07 +08:00
|
|
|
Password *string `json:"password"`
|
2021-07-28 18:03:19 +08:00
|
|
|
}
|
2022-07-18 20:36:31 +08:00
|
|
|
|
|
|
|
|
type AccountChangePasswordForm struct {
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
OldPassword string `json:"oldPassword"`
|
|
|
|
|
NewPassword string `json:"newPassword"`
|
|
|
|
|
}
|