package redeem

import (
	"kami/internal/consts"
)

type FailType int

const (
	FailTypeAccount FailType = 1
	FailTypeCard    FailType = 2
)

type CommonSendCardReq struct {
	GiftCardPwd            string
	OrderNo                string
	CardNo                 string
	Cookie                 string
	OrderAmount            float64
	IsAllowDifferentAmount bool
}

type CommonCardTrimAndCheckerInput struct {
	CardNo      string
	GiftCardPwd string
}

type CommonCardTrimAndCheckerOutput struct {
	*CommonCardTrimAndCheckerInput
	IsOk bool
}

type CommonSendCardRes struct {
	IsSucceed bool
	FailType  FailType `json:"FailType" dc:"错误类型，1.账号问题，2.卡面问题"`
	Message   string
}

type BindCardOutput struct {
	Status       consts.RedeemOrderStatus `json:"status"`
	Remarks      string                   `json:"remarks"`
	Amount       float64                  `json:"amount"`
	RawData      string                   `json:"rawData"`
	GiftCardId   string                   `json:"giftCardId"`
	CardTypeName string                   `json:"cardTypeName"`
}

// QueryBalanceReq 查询余额
type QueryBalanceReq struct {
	Cookie    string `json:"cookie"`
	AccountId string `json:"accountId"`
}

type QueryBalanceRes struct {
	Ok     bool    `json:"ok"`
	Ck     string  `json:"ck"`
	Money  float64 `json:"money"`
	Result string  `json:"result"`
}

type QueryUserInfoRes struct {
	NickName string `json:"nick_name"`
	Username string `json:"username"`
	Ok       bool   `json:"ok"`
}
