package v1

import (
	"kami/internal/model/entity"

	"github.com/gogf/gf/v2/frame/g"

	"kami/api/commonApi"
)

type MerchantConfigListReq struct {
	g.Meta `path:"/merchant/config/getList" tags:"商户信息" method:"get" summary:"获取商户列表信息"`
	MerchantListParamsReq
}

type MerchantConfigListRes struct {
	g.Meta `mime:"application/json"`
	commonApi.CommonPageRes[MerchantInfoRecord]
}

type MerchantConfigDetailReq struct {
	g.Meta      `path:"/merchant/config/getDetail" tags:"商户信息" method:"get" summary:"获取商户详细信息"`
	MerchantUid string `json:"merchantUid" v:"required#商户ID不能为空"`
}

type MerchantConfigDetailRes struct {
	g.Meta `mime:"application/json"`
	MerchantSimpleInfoRecord
}

type MerchantConfigUpdateReq struct {
	g.Meta `path:"/merchant/config/updateDetail" tags:"商户信息" method:"post" summary:"修改商户信息"`
	MerchantSimpleInfoRecord
}

type MerchantConfigUpdateRes struct {
	g.Meta `mime:"application/json"`
}

type MerchantConfigAddReq struct {
	g.Meta `path:"/merchant/config/add" tags:"商户信息" method:"post" summary:"添加商户"`
	MerchantRecord
}

type MerchantConfigAddRes struct {
	g.Meta `mime:"application/json"`
}

type MerchantConfigStatusReq struct {
	g.Meta      `path:"/merchant/config/switchStatus" tags:"商户信息" method:"post" summary:"切换商户状态"`
	MerchantUid string `json:"merchantUid"          description:"商户uid" v:"required#缺少商户ID"`
	Status      string `json:"status" description:"状态ID"`
}

type MerchantConfigStatusRes struct {
	g.Meta `mime:"application/json"`
}

type MerchantAllListReq struct {
	g.Meta `path:"/merchant/list/all" tags:"商户信息" method:"get" summary:"获取商户配置选择列表"`
}

type MerchantAllListRes struct {
	g.Meta `mime:"application/json"`
	commonApi.CommonPageRes[*entity.V1MerchantInfo]
}

type MerchantSampleAllListReq struct {
	g.Meta `path:"/merchant/list/sampleAll" tags:"商户信息" method:"get" summary:"获取所有商户信息"`
}

type SampleAllListRes struct {
	Id           string `json:"id"`
	MerchantName string `json:"merchantName"`
}

type MerchantSampleAllListRes struct {
	g.Meta `mime:"application/json"`
	commonApi.CommonPageRes[*SampleAllListRes]
}
