cslms-api/internal/models/auth.go

30 lines
1.3 KiB
Go
Raw Normal View History

2023-12-27 17:31:49 +09:00
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"`
}