package identity

type GeetestPayload struct {
	LotNumber     string `json:"lot_number"`
	CaptchaOutput string `json:"captcha_output"`
	PassToken     string `json:"pass_token"`
	GenTime       string `json:"gen_time"`
}

type SendCodeRequest struct {
	Email   string          `json:"email"`
	Captcha *GeetestPayload `json:"captcha"`
}

type SendSMSRequest struct {
	Phone   string          `json:"phone"`
	Captcha *GeetestPayload `json:"captcha"`
}

type RegisterRequest struct {
	Email      string          `json:"email"`
	Username   string          `json:"username"`
	Code       string          `json:"code"`
	Password   *string         `json:"password"`
	Captcha    *GeetestPayload `json:"captcha"`
	InviteCode *string         `json:"invite_code"`
}

type RegisterBySMSRequest struct {
	Phone      string          `json:"phone"`
	Username   string          `json:"username"`
	Code       string          `json:"code"`
	Password   *string         `json:"password"`
	Captcha    *GeetestPayload `json:"captcha"`
	InviteCode *string         `json:"invite_code"`
}

type LoginRequest struct {
	Email    string          `json:"email"`
	Password string          `json:"password"`
	Captcha  *GeetestPayload `json:"captcha"`
}

type LoginByCodeRequest struct {
	Email   string          `json:"email"`
	Code    string          `json:"code"`
	Captcha *GeetestPayload `json:"captcha"`
}

type LoginBySMSRequest struct {
	Phone   string          `json:"phone"`
	Code    string          `json:"code"`
	Captcha *GeetestPayload `json:"captcha"`
}

type RefreshRequest struct {
	RefreshToken string `json:"refresh_token"`
}

type UserUpdateRequest struct {
	Nickname *string `json:"nickname"`
	Avatar   *string `json:"avatar"`
}

type PasswordChangeRequest struct {
	OldPassword *string `json:"old_password"`
	NewPassword string  `json:"new_password"`
}

type BindEmailRequest struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

type BindPhoneRequest struct {
	Phone string `json:"phone"`
	Code  string `json:"code"`
}
