Added billable rates; Added project members; Added visibility to projects

This commit is contained in:
Constantin Graf
2024-03-28 18:50:04 +01:00
parent bb42b0940a
commit ba0212ea01
71 changed files with 3236 additions and 174 deletions

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace App\Http\Resources\V1\ProjectMember;
use App\Http\Resources\V1\BaseResource;
use App\Models\ProjectMember;
use Illuminate\Http\Request;
/**
* @property ProjectMember $resource
*/
class ProjectMemberResource extends BaseResource
{
/**
* Transform the resource into an array.
*
* @return array<string, string|bool|int|null>
*/
public function toArray(Request $request): array
{
return [
/** @var string $id ID of project member */
'id' => $this->resource->id,
/** @var int|null $billable_rate Billable rate in cents per hour */
'billable_rate' => $this->resource->billable_rate,
/** @var string $user_id ID of the user */
'user_id' => $this->resource->user_id,
/** @var string $project_id ID of the project */
'project_id' => $this->resource->project_id,
];
}
}