package model

import (
	"kami/api/commonApi"
	"kami/internal/consts"

	"github.com/shopspring/decimal"
)

// PrefetchOrderResult 预拉取订单结果
type PrefetchOrderResult struct {
	PlatformOrderNo string  // 骆驼平台订单号
	AlipayUrl       string  // 支付宝支付链接
	AccountId       int64   // 账号ID
	AccountName     string  // 账号名称
	Amount          float64 // 订单金额
}

// ====================================================================================
// Token 相关模型
// ====================================================================================

// CamelOilTokenCreateInput 创建 Token 输入结构
type CamelOilTokenCreateInput struct {
	Name                string  `json:"name" v:"required" description:"Token名称"`
	Phone               string  `json:"phone" v:"required" description:"绑定的手机号"`
	Remark              string  `json:"remark" description:"备注"`
	RechargeLimitAmount float64 `json:"rechargeLimitAmount" v:"required" description:"充值金额限制"`
	RechargeLimitCount  int     `json:"rechargeLimitCount" v:"required" description:"充值次数限制"`
}

// CamelOilTokenUpdateInput 更新 Token 输入结构
type CamelOilTokenUpdateInput struct {
	TokenId             int64   `json:"tokenId" v:"required" description:"Token ID"`
	Name                string  `json:"name" v:"required" description:"Token名称"`
	Remark              string  `json:"remark" description:"备注"`
	RechargeLimitAmount float64 `json:"rechargeLimitAmount" v:"required" description:"充值金额限制"`
	RechargeLimitCount  int     `json:"rechargeLimitCount" v:"required" description:"充值次数限制"`
}

// CamelOilTokenLoginInput Token 登录输入结构
type CamelOilTokenLoginInput struct {
	TokenId int64  `json:"tokenId" v:"required" description:"Token ID"`
	Code    string `json:"code" v:"required" description:"验证码"`
}

// CamelOilTokenListInput Token 列表查询输入结构
type CamelOilTokenListInput struct {
	commonApi.CommonPageReq
	Name   string `json:"name" description:"Token名称"`
	Status consts.CamelOilTokenStatus `json:"status" description:"状态"`
}

// CamelOilTokenStatusUpdateInput Token 状态更新输入结构
type CamelOilTokenStatusUpdateInput struct {
	TokenId   int64                        `json:"tokenId" v:"required" description:"Token ID"`
	NewStatus consts.CamelOilTokenStatus    `json:"newStatus" v:"required" description:"新状态"`
	Remark    string                       `json:"remark" description:"备注"`
}

// CamelOilCardBindInput 卡密绑定输入结构
type CamelOilCardBindInput struct {
	OrderId      int64           `json:"orderId" v:"required" description:"订单ID"`
	CardNumber   string          `json:"cardNumber" v:"required" description:"卡号"`
	CardPassword string          `json:"cardPassword" v:"required" description:"卡密"`
	Amount       decimal.Decimal `json:"amount" v:"required" description:"绑定金额"`
}

// CamelOilCardListInput 卡密列表查询输入结构
type CamelOilCardListInput struct {
	TokenId   int64 `json:"tokenId" v:"required" description:"Token ID"`
	Current   int   `json:"current" description:"当前页码"`
	PageSize  int   `json:"pageSize" description:"每页数量"`
}

// CamelOilTokenQueryInput Token 查询输入结构
type CamelOilTokenQueryInput struct {
	TokenId int64 `json:"tokenId" v:"required" description:"Token ID"`
}

// CamelOilTokenDeleteInput Token 删除输入结构
type CamelOilTokenDeleteInput struct {
	TokenId int64 `json:"tokenId" v:"required" description:"Token ID"`
}

// CamelOilTokenResendCodeInput 重新发送验证码输入结构
type CamelOilTokenResendCodeInput struct {
	TokenId int64 `json:"tokenId" v:"required" description:"Token ID"`
}
