using System.Text.Json.Serialization;
using Oms.Application.Dtos.Channels;
namespace Oms.Application.Dtos.Orders;
///
/// 销售产品价格发布快照。
///
public class SalesProductPricePublishSnapshotDto
{
///
/// 销售产品主键。
///
public int SalesProductId { get; set; }
///
/// 价格分区 ID(单表时冗余展示;以 PriceAreaRefs 为准)。
///
public int? PriceAreaId { get; set; }
///
/// 价格分区名称。
///
public string? PriceAreaName { get; set; }
///
/// 价格分区包引用(发布时钉包;明细在 t_kpi_area_publish_record)。
///
public List PriceAreaRefs { get; set; } = [];
///
/// 运行时 hydrate / LIVE 用分区明细,不落发布 JSON。
///
[JsonIgnore]
public List PriceAreaInfos { get; set; } = [];
///
/// 价格项列表(不含创建/更新时间)。
///
public List Prices { get; set; } = [];
}
///
/// 销售产品规则发布快照。
///
public class SalesProductRulesPublishSnapshotDto
{
///
/// 产品基础信息。
///
public SalesProductSaveInput? Product { get; set; }
///
/// 分配的服务商列表(发布快照,不含创建/更新时间)。
///
public List Providers { get; set; } = [];
///
/// 黑名单分区 ID。
///
public int? BlacklistAreaId { get; set; }
///
/// 黑名单分区名称。
///
public string? BlacklistAreaName { get; set; }
///
/// 黑名单分区包引用。
///
public KpiAreaPackRefDto? BlacklistAreaRef { get; set; }
///
/// 运行时 hydrate / LIVE 用,不落发布 JSON。
///
[JsonIgnore]
public List BlacklistAreaInfos { get; set; } = [];
///
/// 偏远分区 ID。
///
public int? RemoteAreaId { get; set; }
///
/// 偏远分区名称。
///
public string? RemoteAreaName { get; set; }
///
/// 偏远分区包引用。
///
public KpiAreaPackRefDto? RemoteAreaRef { get; set; }
///
/// 运行时 hydrate / LIVE 用,不落发布 JSON。
///
[JsonIgnore]
public List RemoteAreaInfos { get; set; } = [];
///
/// 计重规则 ID(发布时固化)。
///
public int? WeightRuleId { get; set; }
///
/// 计重规则名称。
///
public string? WeightRuleName { get; set; }
///
/// 计重规则明细,发布时从 t_weight_rule_info 固化。
///
public List WeightRuleInfos { get; set; } = [];
///
/// 计重进位 ID(发布时固化)。
///
public int? WeightRoundingId { get; set; }
///
/// 计重进位名称。
///
public string? WeightRoundingName { get; set; }
///
/// 计重进位区间,发布时从 t_weight_rounding_info 固化。
///
public List WeightRoundingInfos { get; set; } = [];
}
///
/// 服务渠道买价发布快照(渠道自有价区,与产品卖价分区独立)。
///
public class ServiceChannelPricePublishSnapshotDto
{
public int ServiceChannelId { get; set; }
/// 价格分区 ID(单表时冗余展示;以 PriceAreaRefs 为准)。
public int? PriceAreaId { get; set; }
/// 价格分区名称。
public string? PriceAreaName { get; set; }
/// 渠道价区包引用(买价发布时钉包)。
public List PriceAreaRefs { get; set; } = [];
/// 运行时 hydrate / LIVE 用,不落发布 JSON。
[JsonIgnore]
public List PriceAreaInfos { get; set; } = [];
public List Prices { get; set; } = [];
}
///
/// 绑定到订单的快照版本信息。
///
public class ProductSnapshotBinding
{
///
/// 规则快照版本号。
///
public string RulesVersion { get; set; } = string.Empty;
///
/// 价格快照版本号。
///
public string PriceVersion { get; set; } = string.Empty;
///
/// 规则快照生效时间。
///
public DateTime RulesEffectiveTime { get; set; }
///
/// 价格快照生效时间。
///
public DateTime PriceEffectiveTime { get; set; }
///
/// 规则快照内容。
///
public SalesProductRulesPublishSnapshotDto Rules { get; set; } = new();
///
/// 价格快照内容。
///
public SalesProductPricePublishSnapshotDto Price { get; set; } = new();
}