<?php

namespace Database\Factories;

use App\Models\Coach;
use Illuminate\Database\Eloquent\Factories\Factory;

class CoachDocumentFactory extends Factory
{
    public function definition(): array
    {
        return [
            'coach_id' => Coach::factory(),
            'type' => 'certificate',
            'original_name' => 'certificate.pdf',
            'stored_path' => 'coaches/test/documents/'.fake()->uuid().'.pdf',
            'mime_type' => 'application/pdf',
            'size_bytes' => 12345,
            'uploaded_by' => fn (array $attrs) => Coach::find($attrs['coach_id'])?->user_id ?? 1,
        ];
    }
}
