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

17 lines
944 B
Go
Raw 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"
// DepositPolicy 保存气瓶类型对应的押金金额,金额单位为分。
type DepositPolicy struct {
Entity
ProductTypeID uint64 `gorm:"column:product_type_id;not null;uniqueIndex;comment:适用产品类型内部主键" json:"product_type_id"`
Name string `gorm:"column:name;type:varchar(128);not null;comment:押金规则名称" json:"name"`
Amount int64 `gorm:"column:amount;not null;check:amount >= 0;comment:单只气瓶押金金额,单位分" json:"amount"`
RuleText string `gorm:"column:rule_text;type:text;not null;default:'';comment:用户端展示的押金退还规则正文" json:"rule_text"`
}
func init() { database.AppendMigrate(&DepositPolicy{}) }
func (table *DepositPolicy) TableName() string { return "deposit_policy" }