30 lines
1.3 KiB
Go
30 lines
1.3 KiB
Go
package models
|
|
|
|
type LoginRequest struct {
|
|
Username string `json:"user_name" example:"admin0"`
|
|
Password string `json:"password" example:"testme"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
User User `json:"user"`
|
|
Token string `json:"token" example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE3MDI3MTMwMjcsInN1"`
|
|
RefreshToken string `json:"refresh_token" example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE3MDc4OTcwMjcs"`
|
|
}
|
|
|
|
type RegisterRequest struct {
|
|
FirstName string `json:"first_name" example:"길순"`
|
|
LastName string `json:"last_name" example:"홍"`
|
|
Username string `json:"user_name" example:"gilsoon"`
|
|
Password string `json:"password" example:"StrongPass!@#$"`
|
|
Gender string `json:"gender" example:"F"`
|
|
UserRole string `json:"user_role" example:"member"`
|
|
Phone string `json:"phone_cs" example:"01012345678"`
|
|
Image string `json:"upload_image" example:""`
|
|
}
|
|
|
|
type RegisterResponse struct {
|
|
User User `json:"user"`
|
|
Token string `json:"token" example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE3MDI3MTMwMjcsInN1"`
|
|
RefreshToken string `json:"refresh_token" example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE3MDc4OTcwMjcs"`
|
|
}
|