// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1

package types

type ApplyVerificationReq struct {
	Role      string       `json:"role"`      // 申请什么角色
	Materials MaterialJson `json:"materials"` // 证明材料键值对 {"idCardFront": "http...", "license": "http..."}
}

type EmptyResp struct {
}

type FollowUserReq struct {
	Id string `path:"id"`
}

type GetMyVerificationsResp struct {
	List []VerificationItem `json:"list"`
}

type GetPendingListReq struct {
	Offset int64  `form:"offset,default=0"`
	Limit  int64  `form:"limit,default=20"`
	Role   string `form:"role,optional"`   // 筛选角色
	Status string `form:"status,optional"` // 筛选状态，默认 pending
}

type GetPendingListResp struct {
	List  []VerificationItem `json:"list"`
	Total int64              `json:"total"`
}

type GetUserReq struct {
	Id string `path:"id"`
}

type LoginReq struct {
	Phone    string `json:"phone,omitempty,optional"` // 手机号登录
	Username string `json:"username,omitempty"`       // 或用户名登录
	Password string `json:"password"`
	Remember bool   `json:"remember,optional"`
}

type LoginResp struct {
	User User `json:"user"`
}

type LogoutReq struct {
}

type MaterialJson struct {
	IdCardFront     string    `json:"idCardFront"`              // 身份证正面照片URL
	IdCardBack      string    `json:"idCardBack"`               // 身份证反面照片URL
	GameScreenshots []*string `json:"gameScreenshots,optional"` // 游戏截图URL列表
	VoiceDemo       *string   `json:"voiceDemo,optional"`       // 语音认证示例URL
}

type RegisterReq struct {
	Phone    string `json:"phone,omitempty,optional"`
	Email    string `json:"email,omitempty,"`
	Username string `json:"username"`
	Password string `json:"password"`
	Vcode    string `json:"vcode,omitempty"` // 验证码
}

type RegisterResp struct {
	User User `json:"user"`
}

type RejectVerificationReq struct {
	Id     int64  `path:"id"`
	Reason string `json:"reason"` // 必填：驳回原因
}

type ResetPasswordReq struct {
	Phone       string `json:"phone,optional"`
	Email       string `json:"email,omitempty"`
	Vcode       string `json:"vcode"`
	NewPassword string `json:"newPassword"`
}

type SwitchRoleReq struct {
	Role string `json:"role"` // 目标角色
}

type UnfollowUserReq struct {
	Id string `path:"id"`
}

type UpdateNotifySettingsReq struct {
	Order     bool `json:"order,optional"`
	Community bool `json:"community,optional"`
	System    bool `json:"system,optional"`
}

type UpdateThemeSettingsReq struct {
	Theme string `json:"theme"` // dark, light
}

type UpdateUserProfileReq struct {
	Nickname string `json:"nickname,optional"`
	Avatar   string `json:"avatar,optional"`
	Bio      string `json:"bio,optional"`
}

type User struct {
	Id                 string            `json:"id"`
	Username           string            `json:"username"`
	Nickname           string            `json:"nickname"`
	Avatar             string            `json:"avatar"`
	Role               string            `json:"role"`               // consumer, player, owner, admin
	VerifiedRoles      []string          `json:"verifiedRoles"`      // e.g. ["consumer", "player"]
	VerificationStatus map[string]string `json:"verificationStatus"` // e.g. {"player": "approved"}
	Phone              string            `json:"phone,omitempty,optional "`
	Bio                string            `json:"bio,omitempty,optional "`
	CreatedAt          string            `json:"createdAt"` // ISO 8601
}

type VerificationEmptyResp struct {
}

type VerificationIdReq struct {
	Id int64 `path:"id"` // 注意：这是 user_verifications.id
}

type VerificationItem struct {
	Id           int64             `json:"id,string"`     // 认证记录ID (主键，用于管理员操作)
	UserId       int64             `json:"userId,string"` // 申请人ID (外键)
	UserNickname string            `json:"userNickname"`  // 冗余显示，方便前端展示
	Role         string            `json:"role"`          // 申请角色: player, owner
	Status       string            `json:"status"`        // pending, approved, rejected
	Materials    map[string]string `json:"materials"`     // 核心字段：对应 DB 的 JSONB
	RejectReason string            `json:"rejectReason"`  // 驳回原因
	CreatedAt    string            `json:"createdAt"`     // 申请时间
	ReviewedAt   string            `json:"reviewedAt"`    // 审核时间
}
