using System.ComponentModel.DataAnnotations; namespace Oms.Application.Dtos.Orders; /// /// 客户地址分页查询。 /// public class CustomerSenderAddressPaginatedInput { [Newtonsoft.Json.JsonProperty("page")] public int Page { get; set; } = 1; [Newtonsoft.Json.JsonProperty("pageSize")] public int PageSize { get; set; } = 30; /// /// 客户 ID(管理端可选;不传则查全部)。 /// [Newtonsoft.Json.JsonProperty("customerId")] public int? CustomerId { get; set; } /// /// 地址类型:all / sender / return / receiver。 /// [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; } } /// /// 新增客户地址。 /// public class CreateCustomerSenderAddressInput { /// /// 客户 ID(管理端代操作必传;客户门户可省略)。 /// public int? CustomerId { get; set; } /// /// 地址类型:sender 发件 / return 退件 / receiver 收件。 /// [Required] [StringLength(16)] public string AddressType { get; set; } = "sender"; [StringLength(64)] public string? AddressName { get; set; } /// /// 联系人姓名。 /// [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; } } /// /// 更新客户地址。 /// public class UpdateCustomerSenderAddressInput : CreateCustomerSenderAddressInput { [Required] public int Id { get; set; } } /// /// 客户地址出参。 /// public class CustomerSenderAddressOutput { public int Id { get; set; } public int CustomerId { get; set; } /// /// 地址类型 code。 /// public string AddressType { get; set; } = "sender"; /// /// 地址类型名称:发件 / 退件 / 收件。 /// 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; } } /// /// 创建揽收订单入参。 /// public class OrderPickupCreateInput { /// /// 客户 ID(管理端代创建必传;客户门户可省略)。 /// 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; } /// /// 揽收方向:forward / reverse。默认正向。 /// 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; } }