package dto import ( "time" "github.com/gogf/gf/v2/frame/g" ) // CreatePaymentConfigReq 创建支付配置请求 type CreatePaymentConfigReq struct { g.Meta `path:"/create" method:"post" tags:"支付配置" summary:"创建支付配置" dc:"创建新的支付配置"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID PayMethod string `json:"pay_method" binding:"required"` // 支付方式:wechat/alipay ConfigName string `json:"config_name" binding:"required"` // 配置名称 Remark string `json:"remark"` // 备注 IsEnabled bool `json:"is_enabled"` // 是否启用 Config map[string]interface{} `json:"config" binding:"required"` // 配置参数 } // UpdatePaymentConfigReq 更新支付配置请求 type UpdatePaymentConfigReq struct { g.Meta `path:"/update" method:"put" tags:"支付配置" summary:"更新支付配置" dc:"更新指定支付配置"` ID string `json:"id" binding:"required"` // 配置ID TenantID string `json:"tenant_id" binding:"required"` // 租户ID ConfigName string `json:"config_name" binding:"required"` // 配置名称 Remark string `json:"remark"` // 备注 IsEnabled bool `json:"is_enabled"` // 是否启用 Config map[string]interface{} `json:"config" binding:"required"` // 配置参数 } // QueryPaymentConfigReq 查询支付配置请求 type QueryPaymentConfigReq struct { g.Meta `path:"/query" method:"get" tags:"支付配置" summary:"查询支付配置" dc:"查询支付配置列表"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID PayMethod string `json:"pay_method"` // 支付方式(可选) } // ListPaymentConfigReq 查询支付配置列表请求 type ListPaymentConfigReq struct { g.Meta `path:"/list" method:"get" tags:"支付配置" summary:"查询支付配置列表" dc:"分页查询支付配置列表"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID } // DeletePaymentConfigReq 删除支付配置请求 type DeletePaymentConfigReq struct { g.Meta `path:"/delete" method:"delete" tags:"支付配置" summary:"删除支付配置" dc:"删除指定支付配置"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID ConfigID string `json:"config_id" binding:"required"` // 配置ID } // EnablePaymentConfigReq 启用支付配置请求 type EnablePaymentConfigReq struct { g.Meta `path:"/enable" method:"post" tags:"支付配置" summary:"启用支付配置" dc:"启用指定支付配置"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID ConfigID string `json:"config_id" binding:"required"` // 配置ID } // DisablePaymentConfigReq 禁用支付配置请求 type DisablePaymentConfigReq struct { g.Meta `path:"/disable" method:"post" tags:"支付配置" summary:"禁用支付配置" dc:"禁用指定支付配置"` TenantID string `json:"tenant_id" binding:"required"` // 租户ID ConfigID string `json:"config_id" binding:"required"` // 配置ID } // PaymentConfigListResp 支付配置列表响应 type PaymentConfigListResp struct { List []PaymentConfigResp `json:"list"` // 配置列表 Total int64 `json:"total"` // 总数 } // PaymentConfigResp 支付配置响应 type PaymentConfigResp struct { ID string `json:"id"` // 配置ID TenantID string `json:"tenant_id"` // 租户ID PayMethod string `json:"pay_method"` // 支付方式 ConfigName string `json:"config_name"` // 配置名称 Remark string `json:"remark"` // 备注 IsEnabled bool `json:"is_enabled"` // 是否启用 Config map[string]interface{} `json:"config"` // 配置参数 CreatedAt time.Time `json:"created_at"` // 创建时间 UpdatedAt time.Time `json:"updated_at"` // 更新时间 } // WechatConfig 微信支付配置 type WechatConfig struct { ID string `json:"id"` // 配置ID TenantID string `json:"tenant_id"` // 租户ID ConfigName string `json:"config_name"` // 配置名称 AppID string `json:"app_id"` // 应用ID MchID string `json:"mch_id"` // 商户号 APIKey string `json:"api_key"` // API密钥 NotifyURL string `json:"notify_url"` // 回调地址 ReturnURL string `json:"return_url"` // 返回地址 CertPath string `json:"cert_path"` // 证书路径 KeyPath string `json:"key_path"` // 密钥路径 Sandbox bool `json:"sandbox"` // 是否沙箱环境 SupportNative bool `json:"support_native"` // 支持扫码支付 SupportJSAPI bool `json:"support_jsapi"` // 支持JSAPI支付 SupportAPP bool `json:"support_app"` // 支持APP支付 SupportH5 bool `json:"support_h5"` // 支持H5支付 GatewayURL string `json:"gateway_url"` // 网关地址 } // AlipayConfig 支付宝支付配置 type AlipayConfig struct { ID string `json:"id"` // 配置ID TenantID string `json:"tenant_id"` // 租户ID ConfigName string `json:"config_name"` // 配置名称 AppID string `json:"app_id"` // 应用ID NotifyURL string `json:"notify_url"` // 回调地址 ReturnURL string `json:"return_url"` // 返回地址 AppPrivateKey string `json:"app_private_key"` // 应用私钥 AlipayPublicKey string `json:"alipay_public_key"` // 支付宝公钥 Sandbox bool `json:"sandbox"` // 是否沙箱环境 GatewayURL string `json:"gateway_url"` // 网关地址 SupportNative bool `json:"support_native"` // 支持扫码支付 SupportJSAPI bool `json:"support_jsapi"` // 支持JSAPI支付 SupportAPP bool `json:"support_app"` // 支持APP支付 SupportH5 bool `json:"support_h5"` // 支持H5支付 }