<?php

namespace App\Core\Validator\PropertyPayment;

use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Translation\Translator;
use Exception;
use App\Core\Validator\BaseValidator;

class PropertyPaymentTransactionCreateValidator extends BaseValidator
{

    public function __construct
    (
        Translator $translator,
        Container $container
    )
    {
        parent::__construct($translator, $container);
    }

    public function rules($params = null)
    {
        return
            [
                "property_id" => 'required|numeric',
                "title" => 'required',
                "description" => 'required',
                "email" => 'nullable|email',
                "currency" => "required",
                "base_amount" => "required|numeric",
                "commission" => "required|numeric",
                "payment_method" => "required|in:online,offline",
                "payment_type_mapping_id" => "nullable|numeric",

            ];
    }




    public function messages()
    {
        $thisMessages =
            [
            ];
        return array_merge(parent::messages() , $thisMessages);
    }



    public function validate(array $params, array $rules = [], array $messages = [], array $customAttributes = [])
    {
        return $this->make($params, $this->rules($params), $this->messages());
    }

}
