1Panel/backend/app/dto/user.go

40 lines
855 B
Go
Raw Normal View History

2022-08-16 23:30:23 +08:00
package dto
import (
"time"
)
type UserCreate struct {
Name string `json:"name" validate:"name,required"`
Password string `json:"password" validate:"required"`
Email string `json:"email" validate:"required,email"`
}
type UserPage struct {
PageInfo
Name string `json:"name" validate:"required"`
}
type CaptchaResponse struct {
CaptchaID string `json:"captchaID"`
ImagePath string `json:"imagePath"`
}
type UserUpdate struct {
ID uint `json:"id" validate:"required"`
Name string `json:"name" validate:"required"`
Email string `json:"email" validate:"required,email"`
}
type UserInfo struct {
2022-08-16 23:30:23 +08:00
ID uint `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
CreatedAt time.Time `json:"createdAt"`
}
type UserLoginInfo struct {
Name string `json:"name"`
Token string `json:"token"`
}