refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,32 @@
package models
import (
"git.apinb.com/bsm-sdk/core/database"
"git.apinb.com/bsm-sdk/core/types"
"gorm.io/gorm"
)
// MallFreight 运费模板/*
type MallFreight struct {
gorm.Model
types.Std_Identity
types.Std_Status // 1 正常
OwnerId uint `gorm:"column:owner_id;Index;"` // 所属机构id
OwnerIdentity string `gorm:"column:owner_identity;type:varchar(255);not null;" json:"owner_identity"` // 所属机构唯一码
CreatedIdentity string `gorm:"column:created_identity;type:varchar(36);Index;"` // 创建者一标识24位NanoID,36位为UUID
Title string `gorm:"column:title;type:varchar(255);not null;" json:"title"` // 名称
PostType int32 `gorm:"column:post_type;default:1;" json:"post_type"` // 是否包邮1包邮2不包邮
Quota int64 `gorm:"column:quota;default:0;" json:"quota"` // 当types=1时满额包邮
CostType int32 `gorm:"column:cost_type;default:1;" json:"cost_type"` // 计费类型1计件收费2按重收费
RegionType int32 `gorm:"column:region_type;default:2;" json:"region_type"` // 区域限售:1限制2不限制
Rules []MallFreightAttr `gorm:"foreignKey:FreightIdentity;references:Identity;" json:"rules"` // 计费规则
}
func init() {
database.AppendMigrate(&MallFreight{})
}
// TableName .
func (table *MallFreight) TableName() string {
return "mall_freight" //对应数据库表名
}