<?php

namespace App\Http\Requests\Athlete;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class UploadBodyPhotoRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->isAthlete();
    }

    public function rules(): array
    {
        return [
            'photo' => ['required', 'image', 'max:4096', 'mimes:jpg,jpeg,png'],
            'angle' => ['required', Rule::in([
                'front_full', 'back_full', 'side_full', 'front_flex_upper', 'back_flex_upper',
            ])],
        ];
    }
}
