package v1

import (
	"kami/api/commonApi"
	"kami/internal/model/entity"

	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
)

// SubmitReq 礼品卡充值
type SubmitReq struct {
	g.Meta      `path:"/cardInfo/JDCard/order/submit" tags:"京东充值卡订单" method:"post" summary:"充值"`
	CardNo      string  `json:"cardNo" description:"卡号"`
	GiftCardPwd string  `json:"giftCardPwd" v:"required#苹果充值卡不能为空" description:"礼品卡密码"`
	NotifyUrl   string  `json:"notifyUrl" v:"required#回调地址不能为空" description:"回调地址"`
	Amount      float64 `json:"amount" v:"required#充值金额不能为空" description:"充值金额"`
	MerchantId  string  `json:"merchantId" v:"required#商户ID不能为空" description:"商户ID"`
	Attach      string  `json:"attach" description:"附加信息"`
}

type SubmitRes struct {
}

// ListReq 礼品卡订单记录
type ListReq struct {
	g.Meta `path:"/cardInfo/JDCard/order/list" tags:"京东充值卡订单" method:"get" summary:"获取充值记录列表"`
	commonApi.CommonPageReq
	GiftCardPwd     string        `json:"giftCardPwd" description:"礼品卡密码"`
	MerchantId      string        `json:"merchantId" description:"商户ID"`
	Attach          string        `json:"attach" description:"附加信息"`
	DateRange       []*gtime.Time `json:"dateRange" description:"时间范围"`
	AccountNickName string        `json:"accountNickName" dc:"账户昵称"`
	AccountCk       string        `json:"accountCk" description:"账户cookie"`
}

type ListRes struct {
	commonApi.CommonPageRes[*entity.V1CardRedeemOrderInfo]
}

type OrderHistoryReq struct {
	g.Meta  `path:"/cardInfo/JDCard/order/getHistoryList" tags:"京东充值卡订单" method:"get" summary:"获取充值记录列表"`
	OrderNo string `json:"orderNo" description:"订单ID"`
}

type OrderHistoryRes struct {
	commonApi.CommonDataRes[*entity.V1CardRedeemOrderHistory]
}

type OrderCallbackReq struct {
	g.Meta  `path:"/cardInfo/JDCard/order/callback" tags:"沃尔玛充值卡订单" method:"get" summary:"订单回调"`
	OrderNo string `json:"orderNo" description:"订单ID" v:"required#订单号不能为空"`
}

type OrderCallbackRes struct {
}
