Explorar o código

接口实体类,增加必要字段

lichunlei hai 4 meses
pai
achega
ed751b099b
Modificáronse 1 ficheiros con 32 adicións e 1 borrados
  1. 32 1
      Model/Database/ApiInfo.cs

+ 32 - 1
Model/Database/ApiInfo.cs

@@ -157,6 +157,36 @@ namespace Model
         /// </summary>
         [SugarColumn(ColumnDescription = "接口参数", ColumnName = "api_param", IsJson = true, ColumnDataType = "json")]
         public List<ApiParamObject> apiParam { get; set; }
+        [SugarColumn(IsIgnore = true)]
+        public int apiParamCount
+        {
+            get
+            {
+                if (apiParam != null)
+                {
+                    return apiParam.Count;
+                }
+                else
+                {
+                    return 0;
+                }
+            }
+        }
+        [SugarColumn(IsIgnore = true)]
+        public string? apiParamFirstParam
+        {
+            get
+            {
+                if (apiParamCount > 0)
+                {
+                    return apiParam[0].fieldName;
+                }
+                else
+                {
+                    return "";
+                }
+            }
+        }
 
 
         /// <summary>
@@ -308,7 +338,8 @@ namespace Model
         /// <summary>
         /// 关联参数数量
         /// </summary>
-        public int linkParamCount { 
+        public int linkParamCount
+        { 
             get 
             {
                 if (linkParam != null)