<?php

namespace App\Http\Requests\V1\CorporateCard;

use Illuminate\Foundation\Http\FormRequest;

class StoreCorporateCardRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'card_name' => ['required', 'string', 'max:100'],
            'card_company' => ['required', 'string', 'max:50'],
            'card_number' => ['required', 'string', 'max:30'],
            'card_type' => ['required', 'string', 'in:credit,debit'],
            'payment_day' => ['nullable', 'integer', 'min:1', 'max:31'],
            'credit_limit' => ['nullable', 'numeric', 'min:0'],
            'card_holder_name' => ['required', 'string', 'max:100'],
            'actual_user' => ['required', 'string', 'max:100'],
            'expiry_date' => ['nullable', 'string', 'max:10'],
            'cvc' => ['nullable', 'string', 'max:4'],
            'status' => ['nullable', 'string', 'in:active,inactive'],
            'memo' => ['nullable', 'string', 'max:500'],
        ];
    }
}
