<?php

namespace App\Http\Requests\V1\CorporateCard;

use Illuminate\Foundation\Http\FormRequest;

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

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