admin/src/Oms.Domain/OrdersAggregate/Entities/Order.cs
zzh da27fa4377
All checks were successful
Build and Deploy / deploy (push) Successful in 1m0s
feat: 重算应付放行锁渠道池校验,支持切换价格/规则版本与服务商名称
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 18:16:38 +08:00

246 lines
6.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Oms.Domain.Shared;
using SqlSugar;
namespace Oms.Domain.OrdersAggregate.Entities;
[SugarTable("t_order")]
public class Order : OmsAuditedAggregateRoot
{
public string? RequestId { get; set; }
public string ServiceNo { get; set; } = string.Empty;
public string? ClientNo { get; set; }
public string? TrackNo { get; set; }
/// <summary>
/// 服务商单号(下游 createOrderOne 返回 Data.serviceNo)。
/// </summary>
[SugarColumn(Length = 64, IsNullable = true)]
public string? DownstreamServiceNo { get; set; }
public string? ProductCode { get; set; }
public string? ChannelCode { get; set; }
/// <summary>
/// 下游 API 服务商编码(itfx supplierCode)。
/// </summary>
public string? DownstreamSupplierCode { get; set; }
/// <summary>
/// 下游 API 服务商名称(itfx service provider name)。
/// </summary>
[SugarColumn(Length = 128, IsNullable = true)]
public string? DownstreamSupplierName { get; set; }
/// <summary>
/// 下游 itfx 应用 AppKey。
/// </summary>
public string? DownstreamAppKey { get; set; }
/// <summary>
/// 下游 itfx 应用 Id。
/// </summary>
public int? DownstreamAppId { get; set; }
/// <summary>
/// 渠道预报编码(ForecastCode / ApiCode)。
/// </summary>
public string? ChannelForecastCode { get; set; }
public string? ConsigneeCountry { get; set; }
public string? ConsigneeCountryName { get; set; }
public string? CargoAttribute { get; set; }
public string? ExportCustomsMode { get; set; }
/// <summary>
/// 出口资质备案 Id(9610 汇总申报选用)。
/// </summary>
[SugarColumn(IsNullable = true)]
public int? ExportQualificationId { get; set; }
public string? PredeclareFailReason { get; set; }
/// <summary>
/// 待排货原因:入库等环节排货或渠道买价未成功时写入,重算应付成功后清空。
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? AllocationPendingReason { get; set; }
/// <summary>
/// 最近一次排货方案:costLowest / timeFastest / overallBest / designated。
/// </summary>
[SugarColumn(Length = 32, IsNullable = true)]
public string? AllocationScheme { get; set; }
/// <summary>
/// 最近一次排货过程快照 JSON。
/// </summary>
[SugarColumn(ColumnDataType = "json", IsNullable = true)]
public string? AllocationTraceJson { get; set; }
/// <summary>
/// 排货快照写入时间。
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? AllocationTraceTime { get; set; }
public string? SalesProductRulesVersion { get; set; }
public string? SalesProductPriceVersion { get; set; }
public string OrderStatus { get; set; } = string.Empty;
/// <summary>
/// 问题件/已理赔子状态:pending-待处理,processed-已处理。
/// </summary>
public string? HandleStatus { get; set; }
public string? IssueType { get; set; }
public string? IssueTitle { get; set; }
public string? IssueContent { get; set; }
public int? IssueTemplateId { get; set; }
public string? IssueRemark { get; set; }
public DateTime? IssueTime { get; set; }
public string? ClaimType { get; set; }
public decimal? ClaimAmount { get; set; }
public string? ClaimCurrency { get; set; }
public string? ClaimReason { get; set; }
public DateTime? ClaimTime { get; set; }
public string? PreviousOrderStatus { get; set; }
public int? WarehouseId { get; set; }
public int? CustomerId { get; set; }
public int? MemberLevelId { get; set; }
public string? PriceTierKey { get; set; }
public decimal? ReceivableSubtotal { get; set; }
/// <summary>
/// 预报应收快照(创建预报计费后固化;入库重算不覆盖,用于预报→入库差额)。
/// </summary>
public decimal? ForecastReceivableAmount { get; set; }
/// <summary>
/// 预报应付快照(创建预报计费后固化;入库重算不覆盖,用于预报→入库差额)。
/// </summary>
public decimal? ForecastPayableAmount { get; set; }
public decimal LevelDiscountAmount { get; set; }
public int? CouponInstanceId { get; set; }
public decimal CouponDiscountAmount { get; set; }
public decimal? PayableAmount { get; set; }
/// <summary>
/// 订单来源:manual / pickup / upload / batch / platform。
/// </summary>
public string? OrderSource { get; set; }
/// <summary>
/// 预约揽收时间(OrderSource=pickup)。
/// </summary>
public DateTime? PickupTime { get; set; }
/// <summary>
/// 创建时选用的发件地址簿 Id。
/// </summary>
public int? CustomerSenderAddressId { get; set; }
/// <summary>
/// 到仓方式:selfShip / doorPickup。
/// </summary>
[SugarColumn(Length = 16, IsNullable = true)]
public string? InboundMethod { get; set; }
/// <summary>
/// 关联揽收单 Id(冗余,真源为 t_pickup_order_line)。
/// </summary>
[SugarColumn(IsNullable = true)]
public int? PickupOrderId { get; set; }
public string? OrganizationId { get; set; }
public int SecretLevel { get; set; } = 2;
public int? SenderId { get; set; }
public int? RecipientId { get; set; }
public int? DeclarationId { get; set; }
public DateTime? ReceiveTime { get; set; }
public DateTime? ShipTime { get; set; }
public DateTime? PayTime { get; set; }
/// <summary>
/// 是否已支付:0-否,1-是。
/// </summary>
public byte IsPaid { get; set; }
public DateTime? SignTime { get; set; }
public byte IsCod { get; set; }
public string? CodCurrency { get; set; }
public decimal? CodSum { get; set; }
public string? DeclaredCurrency { get; set; }
public decimal? DeclaredSum { get; set; }
public int? Quantity { get; set; }
public byte IsIntercept { get; set; }
public byte IsRemote { get; set; }
/// <summary>
/// 客户勾选附加服务字典 code JSON 数组,如 ["insurance"]。
/// </summary>
public string? AdditionalServices { get; set; }
/// <summary>
/// 履约类型:direct 直发物流 / warehouse 仓内代发。
/// </summary>
[SugarColumn(Length = 16, IsNullable = true)]
public string? FulfillmentType { get; set; }
/// <summary>
/// 代发来源:storeFulfill 店铺代发 / postBind 事后绑定转代发。
/// </summary>
[SugarColumn(Length = 32, IsNullable = true)]
public string? FulfillmentSource { get; set; }
/// <summary>
/// 出单时实际使用的标签模板 Id(面单文件见 t_order_file.systemLabel)。
/// </summary>
public int? LabelTemplateId { get; set; }
public byte IsRefunded { get; set; }
}