585133532c
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
12 lines
575 B
Go
12 lines
575 B
Go
package model
|
|
|
|
// ProductPrice 是套餐的分币种权威价目(int64 最小单位,与 money 口径一致)。
|
|
// v1 Product.Price(元 string)保留为 CNY 默认价:某币种无此表行且币种=CNY 时回退解析 Price。
|
|
// 新增 USD/USDT 等结算币种只需往本表插行,不动 Product。
|
|
type ProductPrice struct {
|
|
Base
|
|
ProductID uint64 `gorm:"uniqueIndex:uq_product_currency;not null" json:"product_id"`
|
|
Currency string `gorm:"uniqueIndex:uq_product_currency;size:16;not null" json:"currency"`
|
|
AmountMinor int64 `gorm:"not null" json:"amount_minor"`
|
|
}
|