2025-12-31 02:34:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
|
|
|
|
|
|
class OutflowResource extends JsonResource
|
|
|
|
|
{
|
|
|
|
|
public function toArray(Request $request): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-03-19 21:01:56 +01:00
|
|
|
'id' => $this->uuid,
|
|
|
|
|
'stream_id' => $this->stream?->uuid,
|
|
|
|
|
'bucket_id' => $this->bucket?->uuid,
|
2025-12-31 02:34:30 +01:00
|
|
|
'amount' => $this->amount_currency,
|
|
|
|
|
'formatted_amount' => $this->formatted_amount,
|
|
|
|
|
'date' => $this->date->format('Y-m-d'),
|
|
|
|
|
'description' => $this->description,
|
|
|
|
|
'is_projected' => $this->is_projected,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|