Browse Source

position modify to p c c t

xf 1 year ago
parent
commit
a5cd699906
1 changed files with 25 additions and 4 deletions
  1. 25 4
      src/XF.Domain.Repository/Entity.cs

+ 25 - 4
src/XF.Domain.Repository/Entity.cs

@@ -197,7 +197,8 @@ public abstract class PositionEntity : FullStateEntity
 {
     public PositionEntity()
     {
-        FullAddress ??= $"{Address}{Street}";
+        Address = $"{Province}{City}{County}{Town}";
+        FullAddress = $"{Address}{Street}";
     }
 
     /// <summary>
@@ -215,19 +216,39 @@ public abstract class PositionEntity : FullStateEntity
     /// <summary>
     /// 行政区划编码
     /// </summary>
-    [SugarColumn(ColumnDescription = "行政区划编码", IsNullable = true)]
+    [SugarColumn(ColumnDescription = "行政区划编码")]
     public string? AreaCode { get; set; }
 
     /// <summary>
-    /// 行政区划地址
+    /// 
     /// </summary>
-    public string? Address { get; set; }
+    public string? Province { get; set; }
+
+    /// <summary>
+    /// 市
+    /// </summary>
+    public string? City { get; set; }
+
+    /// <summary>
+    /// 区/县
+    /// </summary>
+    public string? County { get; set; }
+
+    /// <summary>
+    /// 乡镇(4级行政区划)
+    /// </summary>
+    public string? Town { get; set; }
 
     /// <summary>
     /// 详细街道
     /// </summary>
     public string? Street { get; set; }
 
+    /// <summary>
+    /// 行政区划地址
+    /// </summary>
+    public string? Address { get; set; }
+
     /// <summary>
     /// 完整地址
     /// </summary>