<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class CreateAkunRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            "kode_akun" => "required|unique:table_akun,kode_akun",
            "kategori" => "required|string",
            "nama" => "required|string",
            "kode_induk" => "nullable",
            "jurnal" => "required|string",
            "level" => "nullable",
        ];
    }
}
