<?php

namespace Functional\Tracking\Http\Resources;

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

/**
 * Une série loggée au sein d'une séance.
 */
class SetLogResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'exercise_id' => $this->exercise_id,
            'set_number' => $this->set_number,
            'reps' => $this->reps,
            'weight' => $this->weight,
            'rpe' => $this->rpe,
            'duration_seconds' => $this->duration_seconds,
            'distance_meters' => $this->distance_meters,
            'is_warmup' => $this->is_warmup,
            'is_completed' => $this->is_completed,
            'logged_at' => $this->logged_at,
        ];
    }
}
