重构: 将卡/设备的套餐系列绑定从分配ID改为系列ID
- 数据库: 重命名 series_allocation_id → series_id - Model: IotCard 和 Device 字段重命名 - DTO: 所有请求/响应字段统一为 series_id - Store: 方法重命名,新增 GetByShopAndSeries 查询 - Service: 业务逻辑优化,系列验证和权限验证分离 - 测试: 更新所有测试用例,新增 shop_series_allocation_store_test.go - 文档: 更新 API 文档说明参数变更 BREAKING CHANGE: API 参数从 series_allocation_id 改为 series_id
This commit is contained in:
@@ -35,7 +35,7 @@ type IotCard struct {
|
||||
LastDataCheckAt *time.Time `gorm:"column:last_data_check_at;comment:最后一次流量检查时间" json:"last_data_check_at"`
|
||||
LastRealNameCheckAt *time.Time `gorm:"column:last_real_name_check_at;comment:最后一次实名检查时间" json:"last_real_name_check_at"`
|
||||
LastSyncTime *time.Time `gorm:"column:last_sync_time;comment:最后一次与Gateway同步时间" json:"last_sync_time"`
|
||||
SeriesAllocationID *uint `gorm:"column:series_allocation_id;index;comment:套餐系列分配ID(关联ShopSeriesAllocation)" json:"series_allocation_id,omitempty"`
|
||||
SeriesID *uint `gorm:"column:series_id;index;comment:套餐系列ID(关联PackageSeries)" json:"series_id,omitempty"`
|
||||
FirstCommissionPaid bool `gorm:"column:first_commission_paid;type:boolean;default:false;comment:一次性佣金是否已发放" json:"first_commission_paid"`
|
||||
AccumulatedRecharge int64 `gorm:"column:accumulated_recharge;type:bigint;default:0;comment:累计充值金额(分)" json:"accumulated_recharge"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user