<?php

namespace App\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class ShiftResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'branch_id' => $this->branch_id,
            'user_id' => $this->user_id,
            'cash_register_id' => $this->cash_register_id,
            'opened_at' => $this->opened_at,
            'closed_at' => $this->closed_at,
            'opening_float' => $this->opening_float,
            'closing_float' => $this->closing_float,
            'expected_cash' => $this->expected_cash,
            'cash_variance' => $this->cash_variance,
            'total_sales' => $this->total_sales,
            'total_orders' => $this->total_orders,
            'notes' => $this->notes,
            'status' => $this->status,
        ];
    }
}
