package v1

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

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

type TMallGameShopOrderListReq struct {
	g.Meta `path:"/recharge/tMallGame/shopOrder/getList" tags:"天猫游戏订单" method:"get" summary:"获取淘宝订单详情"`
	commonApi.CommonPageReq
	Account       string        `json:"account" description:"充值账户"`
	TMallOrderNo  string        `json:"tMallOrderNo" description:"淘宝订单号"`
	BuyerNickName string        `json:"buyerNickName" description:"买家昵称"`
	OrderNo       string        `json:"orderNo" description:"订单号"`
	DateRange     []*gtime.Time `json:"dateRange" description:"时间范围"`
}

type ShopOrderRecord struct {
	Id           int         `json:"id" description:""`
	Account      string      `json:"account" description:"充值账户"`
	OrderNo      string      `json:"orderNo" description:"订单号"`
	TMallOrderNo string      `json:"tMallOrderNo" description:"淘宝订单号"`
	BuyerNick    string      `json:"buyerNick" description:"买家昵称"`
	BuyerRate    int         `json:"buyerRate" description:"买家是否评价"`
	Status       string      `json:"status" description:"交易状态"`
	Payment      string      `json:"payment" description:"实付金额"`
	TotalFee     string      `json:"totalFee" description:"商品金额"`
	TradeStatus  string      `json:"tradeStatus" description:"天猫返回状态"`
	BuyerMemo    string      `json:"buyerMemo" description:"买家备注"`
	AlipayNo     string      `json:"alipayNo" description:"支付宝交易号"`
	BuyerMessage string      `json:"buyerMessage" description:"买家留言"`
	PayTime      *gtime.Time `json:"payTime" description:"付款时间"`
	CreateTime   *gtime.Time `json:"createTime" description:"交易创建时间"`
	EndTime      *gtime.Time `json:"endTime" description:"交易结束时间"`
	CreatedAt    *gtime.Time `json:"createdAt" description:""`
	UpdatedAt    *gtime.Time `json:"updatedAt" description:""`
}

type TMallGameShopOrderListRes struct {
	commonApi.CommonPageRes[*ShopOrderRecord]
}

type TMallGameShopOrderGetOneReq struct {
	g.Meta `path:"/recharge/tMallGame/shopOrder/getOne" tags:"天猫游戏订单" method:"get" summary:"获取淘宝订单详情"`
	//ShopId int64 `json:"shopId" description:"店铺订单号" v:"required#必须填写订单ID"`
	OrderNo string `json:"orderNo" description:"订单号" v:"required#必须填写订单号"`
}

type TMallGameShopOrderGetOneRes struct {
	entity.V1RechargeTMallShop
}

type TMallGameShopOrderHistoryReq struct {
	g.Meta  `path:"/recharge/tMallGame/shopOrder/getHistoryList" tags:"天猫游戏订单" method:"get" summary:"获取淘宝订单历史"`
	OrderNo string `json:"orderNo" description:"订单号" v:"required#必须填写订单号"`
}

type TMallGameShopOrderHistoryRes struct {
	commonApi.CommonDataRes[*entity.V1RechargeTMallOrderHistory]
}

type TMallGameShopOrderTMallHistoryReq struct {
	g.Meta `path:"/recharge/tMallGame/shopOrder/getShopHistoryList" tags:"天猫游戏订单" method:"get" summary:"获取淘宝订单历史"`
	ShopId int64 `json:"shopId" description:"订单ID" v:"required#必须填写订单ID"`
}

type TMallGameShopOrderTMallHistoryRes struct {
	commonApi.CommonDataRes[*entity.V1RechargeTMallShopHistory]
}
