refactor: 出库时间更名为首次购买套餐时间,换货新资产不再按换货完成时间记录
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 38s
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 38s
- 字段 outbound_at → first_purchase_at,记录表 tb_asset_outbound_record → tb_asset_first_purchase_record,接口 /outbound-records → /first-purchase-records,筛选参数与导出列同步更名 - 换货后的新资产不因换货写入,在当前世代真正支付套餐订单时才记录;记录来源只保留 order / backfill,去掉换货单字段 - 迁移 000266 重命名列、表、索引与约束;同步 Spec、设计、任务与前端接口变更说明 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -420,24 +420,23 @@ type SilencePolicyMatchRequest struct {
|
||||
PackageID uint `json:"package_id" query:"package_id" validate:"required,min=1" required:"true" description:"套餐 ID"`
|
||||
}
|
||||
|
||||
// AssetOutboundRecordRequest 出库记录查询。
|
||||
type AssetOutboundRecordRequest struct {
|
||||
// AssetFirstPurchaseRecordRequest 首次购买套餐记录查询。
|
||||
type AssetFirstPurchaseRecordRequest struct {
|
||||
AssetType string `json:"asset_type" params:"asset_type" path:"asset_type" validate:"required,oneof=card device iot_card" required:"true" description:"资产类型 card/iot_card/device"`
|
||||
ID uint `json:"id" params:"id" path:"id" validate:"required,min=1" required:"true" description:"资产 ID"`
|
||||
}
|
||||
|
||||
// AssetOutboundRecordResponse 出库记录。
|
||||
type AssetOutboundRecordResponse struct {
|
||||
// AssetFirstPurchaseRecordResponse 首次购买套餐记录。
|
||||
type AssetFirstPurchaseRecordResponse struct {
|
||||
ID uint `json:"id" description:"记录 ID"`
|
||||
AssetType string `json:"asset_type" description:"资产类型"`
|
||||
AssetID uint `json:"asset_id" description:"资产 ID"`
|
||||
AssetIdentifier string `json:"asset_identifier" description:"资产标识快照"`
|
||||
Generation int `json:"generation" description:"世代"`
|
||||
OutboundAt time.Time `json:"outbound_at" description:"出库时间"`
|
||||
Source string `json:"source" description:"来源:order / exchange / backfill"`
|
||||
FirstPurchaseAt time.Time `json:"first_purchase_at" description:"首次购买套餐时间"`
|
||||
Source string `json:"source" description:"来源:order 首次购买套餐 / backfill 历史回填"`
|
||||
SourceName string `json:"source_name" description:"来源名称"`
|
||||
OrderNo string `json:"order_no,omitempty" description:"订单号"`
|
||||
ExchangeNo string `json:"exchange_no,omitempty" description:"换货单号"`
|
||||
EndedAt *time.Time `json:"ended_at,omitempty" description:"该世代结束时间"`
|
||||
EndReason string `json:"end_reason,omitempty" description:"结束原因:exchange_return 换货回库"`
|
||||
CreatedAt time.Time `json:"created_at" description:"记录时间"`
|
||||
|
||||
Reference in New Issue
Block a user