package v1

import (
	"kami/api/commonApi"

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

type OrderQueryReq struct {
	g.Meta          `path:"/merchant/order/query" tags:"商户信息" method:"get" summary:"用户查单详情"`
	MerchantOrderNo string `json:"merchantOrderNo" description:"商户订单号"`
}

type OrderQueryRecord struct {
	OrderNo     string      `json:"orderNo"     orm:"order_no"     description:""`
	Operation   string      `json:"operation"   orm:"operation"    description:"操作：created、failed、recharging"`
	Remark      string      `json:"remark"      orm:"remark"       description:""`
	CreatedAt   *gtime.Time `json:"createdAt"   orm:"created_at"   description:""`
	AccountName string      `json:"accountName" orm:"account_name" description:""`
}

type OrderQueryRes struct {
	g.Meta `mime:"application/json"`
	commonApi.CommonPageRes[*OrderQueryRecord]
	BankOrderId string      `json:"bankOrderId" dc:"平台订单号"`
	CreateTime  *gtime.Time `json:"createTime"  dc:"创建时间"`
	Amount      float64     `json:"amount"      dc:"充值金额"`
}

type OrderQuerySummaryReq struct {
	g.Meta          `path:"/merchant/order/summary" tags:"商户总结信息" method:"get" summary:"用户查单总结"`
	MerchantOrderNo string `json:"merchantOrderNo" description:"商户订单号"`
}

type OrderQuerySummaryRes struct {
	g.Meta `mime:"text/event-stream"`
}
