SysRegion.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证。
  2. //
  3. // 必须在法律法规允许的范围内正确使用,严禁将其用于非法、欺诈、恶意或侵犯他人合法权益的目的。
  4. namespace Admin.NET.Core;
  5. /// <summary>
  6. /// 系统行政地区表
  7. /// </summary>
  8. [SugarTable(null, "系统行政地区表")]
  9. [SysTable]
  10. [SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
  11. [SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
  12. public partial class SysRegion : EntityBaseId
  13. {
  14. /// <summary>
  15. /// 父Id
  16. /// </summary>
  17. [SugarColumn(ColumnDescription = "父Id")]
  18. public long Pid { get; set; }
  19. /// <summary>
  20. /// 名称
  21. /// </summary>
  22. [SugarColumn(ColumnDescription = "名称", Length = 128)]
  23. [Required, MaxLength(128)]
  24. public virtual string Name { get; set; }
  25. /// <summary>
  26. /// 简称
  27. /// </summary>
  28. [SugarColumn(ColumnDescription = "简称", Length = 32)]
  29. [MaxLength(32)]
  30. public string? ShortName { get; set; }
  31. /// <summary>
  32. /// 组合名
  33. /// </summary>
  34. [SugarColumn(ColumnDescription = "组合名", Length = 64)]
  35. [MaxLength(64)]
  36. public string? MergerName { get; set; }
  37. /// <summary>
  38. /// 行政代码
  39. /// </summary>
  40. [SugarColumn(ColumnDescription = "行政代码", Length = 32)]
  41. [MaxLength(32)]
  42. public string? Code { get; set; }
  43. /// <summary>
  44. /// 邮政编码
  45. /// </summary>
  46. [SugarColumn(ColumnDescription = "邮政编码", Length = 6)]
  47. [MaxLength(6)]
  48. public string? ZipCode { get; set; }
  49. /// <summary>
  50. /// 区号
  51. /// </summary>
  52. [SugarColumn(ColumnDescription = "区号", Length = 6)]
  53. [MaxLength(6)]
  54. public string? CityCode { get; set; }
  55. /// <summary>
  56. /// 层级
  57. /// </summary>
  58. [SugarColumn(ColumnDescription = "层级")]
  59. public int Level { get; set; }
  60. /// <summary>
  61. /// 拼音
  62. /// </summary>
  63. [SugarColumn(ColumnDescription = "拼音", Length = 128)]
  64. [MaxLength(128)]
  65. public string? PinYin { get; set; }
  66. /// <summary>
  67. /// 经度
  68. /// </summary>
  69. [SugarColumn(ColumnDescription = "经度")]
  70. public float Lng { get; set; }
  71. /// <summary>
  72. /// 维度
  73. /// </summary>
  74. [SugarColumn(ColumnDescription = "维度")]
  75. public float Lat { get; set; }
  76. /// <summary>
  77. /// 排序
  78. /// </summary>
  79. [SugarColumn(ColumnDescription = "排序")]
  80. public int OrderNo { get; set; } = 100;
  81. /// <summary>
  82. /// 备注
  83. /// </summary>
  84. [SugarColumn(ColumnDescription = "备注", Length = 128)]
  85. [MaxLength(128)]
  86. public string? Remark { get; set; }
  87. /// <summary>
  88. /// 机构子项
  89. /// </summary>
  90. [SugarColumn(IsIgnore = true)]
  91. public List<SysRegion> Children { get; set; }
  92. }