Files
platforms/backend/api/internal/models/gasorder_deposit.go
czl231 3ef33b531d 已完成用户APP首期功能开发
交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
2026-09-13 00:57:32 +08:00

18 lines
1.2 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 功能描述保存供气订单创建时锁定的押金规则快照版本1.0.0。
package models
import "git.apinb.com/bsm-sdk/core/database"
// GasorderDeposit 在订单支付后转换为正式押金事实,防止计费规则在支付期间变化。
type GasorderDeposit struct {
Entity
DepositStatus int `gorm:"column:deposit_status;not null;default:10;index;comment:订单押金状态10=待支付22=已取消23=已转正式押金" json:"deposit_status"`
GasorderBasicID uint64 `gorm:"column:gasorder_basic_id;not null;index;uniqueIndex:idx_gasorder_deposit_product;comment:供气订单内部主键" json:"gasorder_basic_id"`
ProductInfoID uint64 `gorm:"column:product_info_id;not null;index;uniqueIndex:idx_gasorder_deposit_product;comment:实体气瓶内部主键" json:"product_info_id"`
PolicyID uint64 `gorm:"column:policy_id;not null;index;comment:下单时采用的押金规则内部主键" json:"policy_id"`
Amount int64 `gorm:"column:amount;not null;check:amount >= 0;comment:下单时锁定的押金金额,单位分" json:"amount"`
}
func init() { database.AppendMigrate(&GasorderDeposit{}) }
func (table *GasorderDeposit) TableName() string { return "gasorder_deposit" }