user.go 846 B

1234567891011121314151617181920212223
  1. package v1
  2. import "github.com/gogf/gf/v2/frame/g"
  3. type UserRegisterReq struct {
  4. g.Meta `path:"/register" tags:"User" method:"post" summary:"UserRegister"`
  5. Name string ` json:"name" dc:"name"`
  6. Gender uint8 ` json:"gender" dc:"gender"`
  7. Email string `v:"required" json:"email" dc:"email"`
  8. Password string `v:"required" json:"password" dc:"password"`
  9. ConfirmPassword string `v:"required" json:"confirmPassword" dc:"confirmPassword"`
  10. }
  11. type UserCommonRes struct {
  12. Message string `json:"message" dc:"消息"`
  13. Data interface{} `json:"data" dc:"结果"`
  14. }
  15. type UserLoginReq struct {
  16. g.Meta `path:"/login" tags:"User" method:"post" summary:"UserRegister"`
  17. Email string `v:"required" json:"email" dc:"email"`
  18. Password string `v:"required" json:"password" dc:"password"`
  19. }