初始提交:岩美 pay 收款服务(支付宝当面付 + 多商户多渠道架构)
- Go/Gin/GORM + 纯 Go SQLite(无 cgo) - Channel 多渠道接口:支付宝当面付(precreate)/电脑网站支付(page.pay) 已实现,微信占位 - 多商户 merchants 表,回调验签+金额核对+幂等+查单兜底 - 收款页/结果页/二维码端点;docs/ 设计文档与部署 Runbook - 密钥走环境变量/Bitwarden,不入库 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
// Product 固定套餐/商品。价格以本表为准(服务端权威价),绝不信任前端传值。
|
||||
// 金额用 string 存(如 "0.01"),与支付宝 total_amount 口径一致,避免浮点误差。
|
||||
type Product struct {
|
||||
Base
|
||||
MerchantID uint64 `gorm:"index;not null" json:"merchant_id"`
|
||||
Name string `gorm:"size:128;not null" json:"name"`
|
||||
Description string `gorm:"size:255" json:"description"`
|
||||
Price string `gorm:"size:20;not null" json:"price"` // 元,两位小数
|
||||
Active bool `gorm:"default:true" json:"active"`
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
Reference in New Issue
Block a user