소스 검색

plan模型转换器更改$pluckField

kely 10 달 전
부모
커밋
e31a0ea84b
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Models/Enums/ActionObjectType.php
  2. 2 0
      app/Services/History/Converter/PlanConverter.php

+ 1 - 1
app/Models/Enums/ActionObjectType.php

@@ -58,7 +58,7 @@ enum ActionObjectType: string
     {
         return match ($this) {
             self::ASSET, self::PROJECT, self::TASK  => "name",
-            self::PLAN, self::REQUIREMENT => "title",
+            self::PLAN => "title", self::REQUIREMENT => "title",
             default => "name",
         };
     }

+ 2 - 0
app/Services/History/Converter/PlanConverter.php

@@ -7,4 +7,6 @@ use App\Models\Plan;
 class PlanConverter extends ModelConverter
 {
     protected static string $modelClassName = Plan::class;
+
+    protected static string $pluckField = "title";
 }