Ver Fonte

项目列表返回单位类型,容器返回容器库类型

kely há 6 meses atrás
pai
commit
0b486a8d5c

+ 1 - 0
app/Http/Resources/API/LibrarySimpleResource.php

@@ -17,6 +17,7 @@ class LibrarySimpleResource extends JsonResource
         return [
             'id' => $this->id,
             'name' => $this->name,
+            'type'=> $this->type,
         ];
     }
 }

+ 2 - 1
app/Http/Resources/API/ProjectResource.php

@@ -32,7 +32,8 @@ class ProjectResource extends JsonResource
             }),
             'created_at'=>(string)$this->created_at,
             //'asset' => new AssetParentResource($this->asset),
-            'approval_status'=>$this->approval_status
+            'approval_status'=>$this->approval_status,
+            'cost_unit'=>$this->cost_unit,
         ];
     }
 }