<?php

namespace App\Http\Requests\Whatsapp;

use App\Http\Requests\ApiFormRequest;

class WhatsappMembershipUpdateRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'class_section_id' => ['required', 'integer', 'min:1'],
            'primary_id' => ['nullable', 'integer', 'min:1'],
            'second_id' => ['nullable', 'integer', 'min:1'],
            'primary_member' => ['nullable', 'boolean'],
            'second_member' => ['nullable', 'boolean'],
            'school_year' => ['nullable', 'string', 'max:20'],
            'semester' => ['nullable', 'string', 'max:20'],
        ];
    }
}
