using System.ComponentModel.DataAnnotations;
namespace Oms.Application.Dtos.Channels;
///
/// 销售产品计费模拟入参(基于当前库内卖价,非必须已发布)。
///
public class SalesProductBillingSimulateInput
{
[Required]
public int SalesProductId { get; set; }
[Required]
[StringLength(8)]
public string CountryCode { get; set; } = string.Empty;
[StringLength(64)]
public string? Province { get; set; }
[StringLength(64)]
public string? City { get; set; }
[StringLength(32)]
public string? ZipCode { get; set; }
[Required]
public decimal Length { get; set; }
[Required]
public decimal Width { get; set; }
[Required]
public decimal Height { get; set; }
[Required]
public decimal ActualWeight { get; set; }
[StringLength(32)]
public string? CargoAttribute { get; set; }
public int? WarehouseId { get; set; }
public List? AdditionalServices { get; set; }
public decimal? DeclaredSum { get; set; }
[StringLength(16)]
public string? DeclaredCurrency { get; set; }
///
/// 可选覆盖是否偏远;未传时按产品偏远分区命中。
///
public bool? IsRemote { get; set; }
[StringLength(64)]
public string? PriceTierKey { get; set; }
}
///
/// 销售产品计费模拟出参。
///
public class SalesProductBillingSimulateOutput
{
public decimal ChargeableWeight { get; set; }
public List ZoneKeys { get; set; } = [];
public bool IsRemote { get; set; }
public List ReceivableFees { get; set; } = [];
public List PayableFees { get; set; } = [];
public Dictionary ReceivableTotal { get; set; } = new(StringComparer.OrdinalIgnoreCase);
public Dictionary PayableTotal { get; set; } = new(StringComparer.OrdinalIgnoreCase);
///
/// 同币种毛利(应收合计 - 应付合计);多币种时为 null。
///
public decimal? Margin { get; set; }
public List Warnings { get; set; } = [];
}
public class SalesProductBillingSimulateFeeOutput
{
public string CostItem { get; set; } = string.Empty;
public decimal Amount { get; set; }
public string Currency { get; set; } = string.Empty;
public string? Formula { get; set; }
}