<?php

namespace App\Classes\Modules\Transactions\Standards\Validators;

use App\Classes\General\Abstracts\AbstractValidation;

class TransactionValidation extends AbstractValidation
{
    /*
     * 
     * $this->bill_no = $bill_no;
        $this->trans_type1= $trans_type1;
        $this->trans_type2 = $trans_type2;
        $this->amount= $amount;
        $this->currency_id = $currency_id;
        $this->original_amount = $original_amount;
        $this->original_currency_id = $original_currency_id;
        $this->currency_rate = $currency_rate;
        $this->dt_transaction = $dt_transaction;
        $this->status = $status;
        $this->booking_id = $booking_id;
        $this->company_id = $company_id;
     */
    protected function data($object): array 
    {
        return [
            'bill_no' => $object->getBillNo(),
            'trans_type1' => $object->getBillNo(),
            'trans_type2' => $object->getTransType2(),
            'amount' => $object->getAmount(),
            'currency_id' => $object->getCurrency(),
            'original_amount' => $object->getOriginalAmount(),
            'original_currency_id'=>$object->getOriginalCurrency(),
            'dt_transaction'=>$object->getDtTransaction(),
            'status'=>$object->getStatus(),
            'booking_id'=>$object->getBookingId(),
            'company_id'=>$object->getCompanyId()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array 
    {
        return [
            'bill_no' => 'required',
            'trans_type1' => 'required',
            'trans_type2' => 'required',
            'amount' => 'required',
            'currency_id' => 'required',
            'original_amount' => 'required',
            'original_currency_id'=>'required',
            'dt_transaction'=>'required',
            'status'=>'required',
            'booking_id'=>'required',
            'company_id'=>'required'
        ];
    }

    /**
     * @return array
     */
    protected function messages(): array 
    {
        return [];
    }
}