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"` // BizCode 稳定套餐码(如 annual_standard),业务 webhook 回传,供业务方按码映射权益(时长/档位), // 避免业务方硬编码数字 product_id。空=无业务语义(纯测试套餐)。 BizCode string `gorm:"size:64;index" json:"biz_code,omitempty"` }