<?php

namespace App\Core\Validator\OfferPrice;

use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Translation\Translator;

use App\Core\Validator\BaseValidator;

class OfferPriceCreateValidator extends BaseValidator
{

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

    public function rules($params = null)
    {
        return
            [
                "offer_id" => 'required|numeric',
                "date" => 'required|date',
                "property_room_id" => 'required|numeric',
                "property_accommodation_id" => 'required|numeric',
                "number_of_rooms" => 'required|numeric',
                "currency" => 'required',
                "amount" => 'required|numeric',
                "total_amount" => 'required|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());
    }

}
