ExpressLogistics.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using Abp.Domain.Entities;
  9. using IwbZero.Caching;
  10. namespace ShwasherSys.BasicInfo
  11. {
  12. [Table("ExpressLogistics")]
  13. public class ExpressLogistics : Entity<int>
  14. {
  15. public const int ExpressNameMaxLength = 50;
  16. public const int CodeMaxLength = 50;
  17. public const int UserIDLastModMaxLength = 50;
  18. public const int IsLockMaxLength = 1;
  19. [StringLength(ExpressNameMaxLength)]
  20. public string ExpressName { get; set; }
  21. [StringLength(CodeMaxLength)]
  22. public string Code { get; set; }
  23. public int Sort { get; set; }
  24. [Column(TypeName = "smalldatetime")]
  25. public DateTime? TimeCreated { get; set; }
  26. [Column(TypeName = "smalldatetime")]
  27. public DateTime? TimeLastMod { get; set; }
  28. [StringLength(UserIDLastModMaxLength)]
  29. public string UserIDLastMod { get; set; }
  30. [Required]
  31. [StringLength(IsLockMaxLength)]
  32. public string IsLock { get; set; }
  33. // public virtual List<ExpressProviderMapper> ExpressProviderMapper { get; set; }
  34. }
  35. [Table("ExpressServiceProviders")]
  36. public class ExpressServiceProvider : Entity<int>
  37. {
  38. public const int IsLockMaxLength = 1;
  39. public const int UserIDLastModMaxLength = 50;
  40. public const int ProviderNameMaxLength = 50;
  41. public const int QueryApiUrlMaxLength = 150;
  42. public const int CallBackUrlMaxLength = 150;
  43. public const int ExcuteNamespaceAndMethodMaxLength = 150;
  44. /// <summary>
  45. /// 快递查询服务商的名称
  46. /// </summary>
  47. [StringLength(ProviderNameMaxLength)]
  48. public string ProviderName { get; set; }
  49. /// <summary>
  50. /// 查询的API接口地址(预留备用)
  51. /// </summary>
  52. [StringLength(QueryApiUrlMaxLength)]
  53. public string QueryApiUrl { get; set; }
  54. /// <summary>
  55. /// 服务商回调的接口地址(预留备用)
  56. /// </summary>
  57. [StringLength(CallBackUrlMaxLength)]
  58. public string CallBackUrl { get; set; }
  59. /// <summary>
  60. /// 执行调用服务商方法(预留备用,不同服务商执行逻辑不同,后续可采用反射的方式执行)
  61. /// </summary>
  62. [StringLength(ExcuteNamespaceAndMethodMaxLength)]
  63. public string ExcuteNamespaceAndMethod { get; set; }
  64. [Column(TypeName = "smalldatetime")]
  65. public DateTime? TimeCreated { get; set; }
  66. [Column(TypeName = "smalldatetime")]
  67. public DateTime? TimeLastMod { get; set; }
  68. [StringLength(UserIDLastModMaxLength)]
  69. public string UserIDLastMod { get; set; }
  70. [Required]
  71. [StringLength(IsLockMaxLength)]
  72. public string IsLock { get; set; }
  73. }
  74. [Table("ExpressProviderMappers")]
  75. public class ExpressProviderMapper : Entity<int>
  76. {
  77. public const int MapperCodeMaxLength = 50;
  78. public const int ExtendInfoMaxLength = 500;
  79. public const int QueryUrlMaxLength = 500;
  80. [ForeignKey("ExpressId")]
  81. public ExpressLogistics ExpressLogistics { get; set; }
  82. public int ExpressId { get; set; }
  83. public int ProviderId { get; set; }
  84. [ForeignKey("ProviderId")]
  85. public ExpressServiceProvider ExpressServiceProvider { get; set; }
  86. [StringLength(MapperCodeMaxLength)]
  87. public string MapperCode { get; set; }
  88. [StringLength(QueryUrlMaxLength)]
  89. public string QueryUrl { get; set; }
  90. [StringLength(ExtendInfoMaxLength)]
  91. public string ExtendInfo { get; set; }
  92. public int? ActiveStatus { get; set; }
  93. }
  94. }