From 116355835a46f1596f7af761e9195b914c73ebfe Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 31 Jan 2026 11:31:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(model):=20=E6=B7=BB=E5=8A=A0=E4=BB=A3?= =?UTF-8?q?=E8=B4=AD=E5=92=8C=E5=BC=BA=E5=85=85=E9=85=8D=E7=BD=AE=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/model/order.go | 3 +++ internal/model/shop_series_allocation.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/internal/model/order.go b/internal/model/order.go index aca14ab..eca678a 100644 --- a/internal/model/order.go +++ b/internal/model/order.go @@ -39,6 +39,9 @@ type Order struct { SellerShopID *uint `gorm:"column:seller_shop_id;index;comment:销售店铺ID(用于成本价差佣金计算)" json:"seller_shop_id,omitempty"` SellerCostPrice int64 `gorm:"column:seller_cost_price;type:bigint;default:0;comment:销售成本价(分,用于计算利润)" json:"seller_cost_price"` SeriesID *uint `gorm:"column:series_id;index;comment:系列ID(用于查询分配配置)" json:"series_id,omitempty"` + + // 代购信息 + IsPurchaseOnBehalf bool `gorm:"column:is_purchase_on_behalf;type:boolean;default:false;comment:是否为代购订单" json:"is_purchase_on_behalf"` } // TableName 指定表名 diff --git a/internal/model/shop_series_allocation.go b/internal/model/shop_series_allocation.go index 985134f..31e79a6 100644 --- a/internal/model/shop_series_allocation.go +++ b/internal/model/shop_series_allocation.go @@ -24,6 +24,10 @@ type ShopSeriesAllocation struct { OneTimeCommissionMode string `gorm:"column:one_time_commission_mode;type:varchar(20);comment:返佣模式 fixed-固定金额 percent-百分比" json:"one_time_commission_mode"` OneTimeCommissionValue int64 `gorm:"column:one_time_commission_value;type:bigint;default:0;comment:佣金金额(分)或比例(千分比)" json:"one_time_commission_value"` + // 强充配置 + EnableForceRecharge bool `gorm:"column:enable_force_recharge;type:boolean;default:false;comment:是否启用强充(累计充值时可选)" json:"enable_force_recharge"` + ForceRechargeAmount int64 `gorm:"column:force_recharge_amount;type:bigint;default:0;comment:强充金额(分,0表示使用阈值金额)" json:"force_recharge_amount"` + Status int `gorm:"column:status;type:int;default:1;not null;comment:状态 1-启用 2-禁用" json:"status"` }