Files
headroom/backend/app/Http/Resources/ProjectMonthPlanResource.php
Santhosh Janardhanan b7bbfb45c0 docs(openspec): add reporting API contract documentation
Add comprehensive API documentation for the reporting endpoint:
- Request/response structure
- View type inference (did/is/will)
- Blank vs explicit zero semantics
- Status values and error responses

Related to enhanced-allocation change.
2026-03-08 18:22:27 -04:00

22 lines
612 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
class ProjectMonthPlanResource extends BaseResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'project_id' => $this->project_id,
'month' => $this->month?->format('Y-m'),
'planned_hours' => $this->formatDecimal($this->planned_hours),
'is_blank' => $this->planned_hours === null,
'created_at' => $this->formatDate($this->created_at),
'updated_at' => $this->formatDate($this->updated_at),
];
}
}