Sfoglia il codice sorgente

获取字段类型

rkljw 1 giorno fa
parent
commit
8a62d5e60b

+ 12 - 0
app/JsonRpc/FormService.php

@@ -335,4 +335,16 @@ class FormService implements FormServiceInterface
             return Result::error('查询失败:' . $e->getMessage());
         }
     }
+    /**
+     * 获取字段类型列表
+     */
+    public function getGlobalTableFieldTypeList(array $data): array
+    {
+        try {
+            $list =  Db::connection('global')->table("global_table_field_type")->get();
+            return Result::success($list);
+        }catch (\Throwable $e){
+            return Result::error('查询失败:' . $e->getMessage());
+        }
+    }
 }

+ 5 - 0
app/JsonRpc/FormServiceInterface.php

@@ -59,6 +59,11 @@ interface FormServiceInterface
      *  @return array
     */
     public function getGlobalTableData(array $data):array;
+    /**
+     * @param array $data
+     *  @return array
+    */
+    public function getGlobalTableFieldTypeList(array $data):array;
    
 
 

+ 0 - 6
app/Model/GlobalTableFieldType.php

@@ -19,12 +19,6 @@ class GlobalTableFieldType extends Model
      */
     protected ?string $connection = 'global';
 
-    /**
-     * The attributes that are mass assignable.
-     */
-    // protected array $fillable = [
-    //     'website_id'
-    // ];
 
     /**
      * The attributes that should be cast to native types.