initial commit

This commit is contained in:
bastien
2026-06-28 12:29:53 +02:00
parent 03e85d2f9d
commit b2443b654c
220 changed files with 24969 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class BookingResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'uuid' => $this->uuid,
'slot_start' => $this->slot_start?->toIso8601String(),
'slot_end' => $this->slot_end?->toIso8601String(),
'booking_fee' => (float) $this->booking_fee,
'reserved_amount' => (float) $this->reserved_amount,
'penalty_amount' => (float) $this->penalty_amount,
'status' => $this->status,
'cancelled_at' => $this->cancelled_at?->toIso8601String(),
'penalty_applied_at' => $this->penalty_applied_at?->toIso8601String(),
'created_at' => $this->created_at?->toIso8601String(),
'machine' => new MachineResource($this->whenLoaded('machine')),
'user' => new UserResource($this->whenLoaded('user')),
];
}
}