package model // Merchant 一个「业务 × 渠道」的收款凭证。 // 多业务、多支付宝账户、以后加微信,都是往这张表加行 —— 主流程不变。 type Merchant struct { Base Code string `gorm:"uniqueIndex;size:64" json:"code"` // 业务标识:yanmei / jiu ... Name string `gorm:"size:128" json:"name"` // 展示名 Channel string `gorm:"index;size:16" json:"channel"` // alipay | wechat Production bool `json:"production"` // false=沙箱 Enabled bool `gorm:"default:true" json:"enabled"` // —— 支付宝 ——(app_id 用于异步回调反查商户) AppID string `gorm:"index;size:64" json:"app_id"` AppPrivateKey string `gorm:"type:text" json:"-"` // 应用私钥,绝不下发 AlipayPublicKey string `gorm:"type:text" json:"-"` // 支付宝公钥(验签用) // —— 微信 ——(预留,渠道尚未实现) MchID string `gorm:"size:64" json:"mch_id,omitempty"` WxAppID string `gorm:"size:64" json:"wx_app_id,omitempty"` APIv3Key string `gorm:"type:text" json:"-"` CertSerial string `gorm:"size:128" json:"-"` WxPrivateKey string `gorm:"type:text" json:"-"` }