增加用户管理
This commit is contained in:
@@ -33,6 +33,7 @@ const (
|
||||
|
||||
type Player struct {
|
||||
ID string `json:"id"`
|
||||
UserID string `json:"userId,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Cards []Card `json:"cards,omitempty"`
|
||||
CardCount int `json:"cardCount"`
|
||||
@@ -101,3 +102,39 @@ type CreateRoomRequest struct {
|
||||
type JoinRoomRequest struct {
|
||||
PlayerName string `json:"playerName"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"-"`
|
||||
Nickname string `json:"nickname"`
|
||||
}
|
||||
|
||||
type RegisterRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Nickname string `json:"nickname"`
|
||||
Captcha string `json:"captcha"`
|
||||
CaptchaID string `json:"captchaId"`
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Captcha string `json:"captcha"`
|
||||
CaptchaID string `json:"captchaId"`
|
||||
}
|
||||
|
||||
type CaptchaResponse struct {
|
||||
CaptchaID string `json:"captchaId"`
|
||||
Image string `json:"image"`
|
||||
}
|
||||
|
||||
type LeaveRoomRequest struct {
|
||||
PlayerID string `json:"playerId"`
|
||||
}
|
||||
|
||||
type PlayerRoomInfo struct {
|
||||
UserID string `json:"userId"`
|
||||
RoomID string `json:"roomId"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user