<?php

namespace App\Http\Resources;

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

class LoadingLinesResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            "id" => $this->id,
            "synced_id" => $this->synced_id,
            "header_id" => $this->header_id,
            "breeder" => [
                "id" => $this->breeder_id,
                "name" => $this->breeder_name,
            ],
            "class" => [
                "id" => $this->class_id,
                "name" => $this->class_name,
            ],
            "initial_count" => $this->initial_population,
            "reject_count" => $this->reject,
            "doa" => $this->doa,
            "net" => $this->net_population,
            "loaded_at" => $this->loaded_at,
            "notes" => $this->notes,
            "created_at" => $this->created_at,
            "updated_at" => $this->updated_at,
            "deleted_at" => $this->deleted_at,
        ];
    }
}
