admin/src/Oms.Application/Dtos/Warehouse/WarehouseDtos.cs
2026-07-15 14:32:55 +08:00

526 lines
11 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 System.ComponentModel.DataAnnotations;
namespace Oms.Application.Dtos.Warehouse;
public class WarehousePageInput
{
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 30;
public int? CustomerId { get; set; }
}
// --- SKU ---
public class WarehouseSkuListInput : WarehousePageInput
{
public string? Keyword { get; set; }
}
public class WarehouseSkuOutput
{
public int Id { get; set; }
public int CustomerId { get; set; }
public string SkuCode { get; set; } = string.Empty;
public string SkuName { get; set; } = string.Empty;
public string? SkuImageUrl { get; set; }
public decimal? WeightG { get; set; }
public decimal? LengthCm { get; set; }
public decimal? WidthCm { get; set; }
public decimal? HeightCm { get; set; }
public string? Remark { get; set; }
public int TotalQty { get; set; }
public DateTime CreateTime { get; set; }
public DateTime? UpdateTime { get; set; }
}
public class WarehouseSkuSaveInput
{
public int Id { get; set; }
public int? CustomerId { get; set; }
[Required]
public string SkuCode { get; set; } = string.Empty;
[Required]
public string SkuName { get; set; } = string.Empty;
public string? SkuImageUrl { get; set; }
public decimal? WeightG { get; set; }
public decimal? LengthCm { get; set; }
public decimal? WidthCm { get; set; }
public decimal? HeightCm { get; set; }
public string? Remark { get; set; }
}
public class WarehouseSkuBindMappingInput
{
public int? CustomerId { get; set; }
[Required]
public int StoreId { get; set; }
[Required]
public string PlatformSku { get; set; } = string.Empty;
[Required]
public int SkuId { get; set; }
}
public class WarehouseSkuMappingOutput
{
public int Id { get; set; }
public int StoreId { get; set; }
public string PlatformSku { get; set; } = string.Empty;
public int SkuId { get; set; }
public string SkuCode { get; set; } = string.Empty;
}
// --- Bin Location ---
public class WarehouseBinLocationListInput
{
public int WarehouseId { get; set; }
public string? Keyword { get; set; }
public bool? IsEnabled { get; set; }
}
public class WarehouseBinLocationOutput
{
public int Id { get; set; }
public int WarehouseId { get; set; }
public string BinCode { get; set; } = string.Empty;
public string? BinName { get; set; }
public string? ZoneCode { get; set; }
public bool IsEnabled { get; set; }
public string? Remark { get; set; }
}
public class WarehouseBinLocationSaveInput
{
public int Id { get; set; }
[Required]
public int WarehouseId { get; set; }
[Required]
public string BinCode { get; set; } = string.Empty;
public string? BinName { get; set; }
public string? ZoneCode { get; set; }
public bool IsEnabled { get; set; } = true;
public string? Remark { get; set; }
}
// --- Inbound ---
public class WarehouseInboundListInput : WarehousePageInput
{
public int? WarehouseId { get; set; }
/// <summary>
/// 收货状态:forecasted / received / completed;空或 all 表示全部。
/// </summary>
public string? ReceiptStatus { get; set; }
public string? Keyword { get; set; }
}
public class WarehouseInboundOutput
{
public int Id { get; set; }
public int CustomerId { get; set; }
public int WarehouseId { get; set; }
public string NoticeNo { get; set; } = string.Empty;
public string? MarkReference { get; set; }
public string InboundType { get; set; } = string.Empty;
public string ReceiptStatus { get; set; } = string.Empty;
public DateTime? ExpectedArrivalTime { get; set; }
public DateTime? ActualArrivalTime { get; set; }
public string? Remark { get; set; }
public int BoxCount { get; set; }
public int PlannedQty { get; set; }
public DateTime CreateTime { get; set; }
}
public class WarehouseInboundLineSaveInput
{
public int SkuId { get; set; }
public string SkuCode { get; set; } = string.Empty;
public int PlannedQty { get; set; }
}
public class WarehouseInboundBoxSaveInput
{
public string BoxSeqNo { get; set; } = string.Empty;
public string? MarkBoxNo { get; set; }
public decimal? WeightG { get; set; }
public decimal? LengthCm { get; set; }
public decimal? WidthCm { get; set; }
public decimal? HeightCm { get; set; }
public List<WarehouseInboundLineSaveInput> Lines { get; set; } = [];
}
public class WarehouseInboundSaveInput
{
public int Id { get; set; }
public int? CustomerId { get; set; }
[Required]
public int WarehouseId { get; set; }
public string? MarkReference { get; set; }
public string InboundType { get; set; } = "normal";
public DateTime? ExpectedArrivalTime { get; set; }
public string? Remark { get; set; }
public List<WarehouseInboundBoxSaveInput> Boxes { get; set; } = [];
}
public class WarehouseInboundLineOutput
{
public int Id { get; set; }
public int SkuId { get; set; }
public string SkuCode { get; set; } = string.Empty;
public int PlannedQty { get; set; }
public int? ReceivedQty { get; set; }
public int? BinLocationId { get; set; }
}
public class WarehouseInboundBoxOutput
{
public int Id { get; set; }
public string BoxSeqNo { get; set; } = string.Empty;
public string? MarkBoxNo { get; set; }
public decimal? WeightG { get; set; }
public decimal? LengthCm { get; set; }
public decimal? WidthCm { get; set; }
public decimal? HeightCm { get; set; }
public bool IsReceived { get; set; }
public List<WarehouseInboundLineOutput> Lines { get; set; } = [];
}
public class WarehouseInboundDetailOutput : WarehouseInboundOutput
{
public List<WarehouseInboundBoxOutput> Boxes { get; set; } = [];
}
public class WarehouseInboundConfirmLineInput
{
public int LineId { get; set; }
public int ReceivedQty { get; set; }
public int BinLocationId { get; set; }
}
public class WarehouseInboundConfirmBoxInput
{
public int BoxId { get; set; }
public List<WarehouseInboundConfirmLineInput> Lines { get; set; } = [];
}
public class WarehouseInboundConfirmReceiveInput
{
[Required]
public int InboundNoticeId { get; set; }
public int? CustomerId { get; set; }
public List<WarehouseInboundConfirmBoxInput> Boxes { get; set; } = [];
}
public class WarehouseInboundSummaryOutput
{
public int Forecasted { get; set; }
public int Received { get; set; }
public int Completed { get; set; }
}
// --- Parcel ---
public class WarehouseParcelListInput : WarehousePageInput
{
public int? WarehouseId { get; set; }
/// <summary>
/// 生命周期状态:inTransit / arrived / stored;空或 all 表示全部。
/// </summary>
public string? LifecycleStatus { get; set; }
public string? Keyword { get; set; }
}
public class WarehouseParcelItemSaveInput
{
public int Id { get; set; }
public string? ProductName { get; set; }
public string? AttributeText { get; set; }
/// <summary>商品图片 URL。</summary>
public string? ImageUrl { get; set; }
public int Quantity { get; set; }
public string? Remark { get; set; }
}
public class WarehouseParcelItemOutput
{
public int Id { get; set; }
public string? ProductName { get; set; }
public string? AttributeText { get; set; }
/// <summary>商品图片 URL。</summary>
public string? ImageUrl { get; set; }
public int Quantity { get; set; }
public int? SkuId { get; set; }
public string? SkuCode { get; set; }
public int? BinLocationId { get; set; }
public string? Remark { get; set; }
}
public class WarehouseParcelOutput
{
public int Id { get; set; }
public int CustomerId { get; set; }
public int WarehouseId { get; set; }
public string TrackingNo { get; set; } = string.Empty;
public string? CarrierName { get; set; }
public string LifecycleStatus { get; set; } = string.Empty;
public DateTime? ArrivalTime { get; set; }
public string? Remark { get; set; }
public List<WarehouseParcelItemOutput> Items { get; set; } = [];
public DateTime CreateTime { get; set; }
}
public class WarehouseParcelSaveInput
{
public int Id { get; set; }
public int? CustomerId { get; set; }
[Required]
public int WarehouseId { get; set; }
[Required]
public string TrackingNo { get; set; } = string.Empty;
public string? CarrierName { get; set; }
public string LifecycleStatus { get; set; } = "inTransit";
public string? Remark { get; set; }
public List<WarehouseParcelItemSaveInput> Items { get; set; } = [];
}
public class WarehouseParcelPutawayItemInput
{
public int ItemId { get; set; }
public int SkuId { get; set; }
public int BinLocationId { get; set; }
}
public class WarehouseParcelPutawayInput
{
[Required]
public int ParcelId { get; set; }
public int? CustomerId { get; set; }
public List<WarehouseParcelPutawayItemInput> Items { get; set; } = [];
}
// --- Inventory ---
public class WarehouseInventoryListInput : WarehousePageInput
{
public int? WarehouseId { get; set; }
public string? Keyword { get; set; }
}
public class WarehouseInventoryOutput
{
public int SkuId { get; set; }
public string SkuCode { get; set; } = string.Empty;
public string SkuName { get; set; } = string.Empty;
public int WarehouseId { get; set; }
public int TotalQty { get; set; }
public int BinCount { get; set; }
}
public class WarehouseInventoryBinDetailOutput
{
public int Id { get; set; }
public int BinLocationId { get; set; }
public string BinCode { get; set; } = string.Empty;
public string? BinName { get; set; }
public int Qty { get; set; }
}
public class WarehouseInventoryRelocateInput
{
public int? CustomerId { get; set; }
[Required]
public int WarehouseId { get; set; }
[Required]
public int SkuId { get; set; }
[Required]
public int SourceBinLocationId { get; set; }
[Required]
public int TargetBinLocationId { get; set; }
[Range(1, int.MaxValue)]
public int Qty { get; set; }
}
// --- Parcel arrival(快递到仓)---
public class WarehouseParcelArrivalListInput : WarehousePageInput
{
public int? WarehouseId { get; set; }
public string? Keyword { get; set; }
}
public class WarehouseParcelArrivalCreateInput
{
public int? CustomerId { get; set; }
[Required]
public int WarehouseId { get; set; }
[Required]
public string TrackingNo { get; set; } = string.Empty;
}
public class WarehouseParcelArrivalOutput
{
public int Id { get; set; }
public int CustomerId { get; set; }
public int WarehouseId { get; set; }
public string? WarehouseName { get; set; }
public int? ParcelId { get; set; }
public string TrackingNo { get; set; } = string.Empty;
public DateTime CreateTime { get; set; }
public int CreateUserId { get; set; }
public string? CreateBy { get; set; }
}