<?php

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

use App\Classes\General\Abstracts\AbstractValidation;

class TransactionDetailValidation 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 [
            'trans_type1' => $object->getTransType1(),
            'trans_type2' => $object->getTransType2(),
            'transaction_id' => $object->getTransactionId(),
            'product_code' => $object->getProductCode(),
            'product_name'=>$object->getProductName(),
            'qty'=>$object->getQty(),
            'price'=>$object->getPrice(),
            'amount' => $object->getAmount()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array 
    {
        return [
            'trans_type1' => 'required',
            'trans_type2' => 'required',
            'transaction_id' => 'required',
            'product_code' => 'required',
            'product_name'=>'required',
            'qty'=>'required',
            'price'=>'required',
            'amount' => 'required'
        ];
    }

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