<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class StoreBanRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->can('bans.manage');
    }

    public function rules(): array
    {
        return [
            'citizenid' => ['nullable', 'string', 'max:100'],
            'license' => ['required', 'string', 'max:100'],
            'reason' => ['required', 'string', 'max:500'],
            'expires_at' => ['nullable', 'date', 'after:now'],
        ];
    }
}
