admin/src/Oms.Application/Dtos/Orders/CustomerSenderAddressDtos.cs
zzh 8d1e3ab17f
All checks were successful
Build and Deploy / deploy (push) Successful in 1m47s
feat: 揽收方向与地址类型,补充迁移并清理已落地 SQL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:34:55 +08:00

207 lines
4.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 System.ComponentModel.DataAnnotations;
namespace Oms.Application.Dtos.Orders;
/// <summary>
/// 客户地址分页查询。
/// </summary>
public class CustomerSenderAddressPaginatedInput
{
[Newtonsoft.Json.JsonProperty("page")]
public int Page { get; set; } = 1;
[Newtonsoft.Json.JsonProperty("pageSize")]
public int PageSize { get; set; } = 30;
/// <summary>
/// 客户 ID(管理端可选;不传则查全部)。
/// </summary>
[Newtonsoft.Json.JsonProperty("customerId")]
public int? CustomerId { get; set; }
/// <summary>
/// 地址类型:all / sender / return / receiver。
/// </summary>
[Newtonsoft.Json.JsonProperty("addressType")]
public string? AddressType { get; set; }
[Newtonsoft.Json.JsonProperty("keyword")]
public string? Keyword { get; set; }
[Newtonsoft.Json.JsonProperty("onlyDefault")]
public bool OnlyDefault { get; set; }
}
/// <summary>
/// 新增客户地址。
/// </summary>
public class CreateCustomerSenderAddressInput
{
/// <summary>
/// 客户 ID(管理端代操作必传;客户门户可省略)。
/// </summary>
public int? CustomerId { get; set; }
/// <summary>
/// 地址类型:sender 发件 / return 退件 / receiver 收件。
/// </summary>
[Required]
[StringLength(16)]
public string AddressType { get; set; } = "sender";
[StringLength(64)]
public string? AddressName { get; set; }
/// <summary>
/// 联系人姓名。
/// </summary>
[Required]
[StringLength(50)]
public string SenderName { get; set; } = string.Empty;
[StringLength(255)]
public string? Company { get; set; }
[StringLength(8)]
public string? CountryCode { get; set; }
[StringLength(50)]
public string? Province { get; set; }
[StringLength(50)]
public string? City { get; set; }
[StringLength(50)]
public string? ZipCode { get; set; }
[Required]
[StringLength(500)]
public string StreetAddress1 { get; set; } = string.Empty;
[StringLength(500)]
public string? StreetAddress2 { get; set; }
[StringLength(500)]
public string? StreetAddress3 { get; set; }
[StringLength(50)]
public string? HouseNumber { get; set; }
[StringLength(50)]
public string? Phone { get; set; }
[StringLength(50)]
public string? TelePhone { get; set; }
[StringLength(60)]
public string? Email { get; set; }
public bool IsDefault { get; set; }
}
/// <summary>
/// 更新客户地址。
/// </summary>
public class UpdateCustomerSenderAddressInput : CreateCustomerSenderAddressInput
{
[Required]
public int Id { get; set; }
}
/// <summary>
/// 客户地址出参。
/// </summary>
public class CustomerSenderAddressOutput
{
public int Id { get; set; }
public int CustomerId { get; set; }
/// <summary>
/// 地址类型 code。
/// </summary>
public string AddressType { get; set; } = "sender";
/// <summary>
/// 地址类型名称:发件 / 退件 / 收件。
/// </summary>
public string? AddressTypeName { get; set; }
public string? AddressName { get; set; }
public string SenderName { get; set; } = string.Empty;
public string? Company { get; set; }
public int? Country { get; set; }
public string? CountryCode { get; set; }
public string? Province { get; set; }
public string? City { get; set; }
public string? ZipCode { get; set; }
public string StreetAddress1 { get; set; } = string.Empty;
public string? StreetAddress2 { get; set; }
public string? StreetAddress3 { get; set; }
public string? HouseNumber { get; set; }
public string? Phone { get; set; }
public string? TelePhone { get; set; }
public string? Email { get; set; }
public bool IsDefault { get; set; }
public DateTime? CreateTime { get; set; }
public DateTime? UpdateTime { get; set; }
}
/// <summary>
/// 创建揽收订单入参。
/// </summary>
public class OrderPickupCreateInput
{
/// <summary>
/// 客户 ID(管理端代创建必传;客户门户可省略)。
/// </summary>
public int? CustomerId { get; set; }
public string? RequestId { get; set; }
public string? ClientNo { get; set; }
[Required]
public string ProductCode { get; set; } = string.Empty;
[Required]
public int WarehouseId { get; set; }
[Required]
public int SenderAddressId { get; set; }
/// <summary>
/// 揽收方向:forward / reverse。默认正向。
/// </summary>
public string? Direction { get; set; }
[Required]
public DateTime PickupTime { get; set; }
[Required]
[StringLength(200)]
public string CargoName { get; set; } = string.Empty;
[Required]
public decimal ActualWeight { get; set; }
public string? CargoAttribute { get; set; }
}