<?php

namespace App\Http\Requests;


class StoreGame extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $id = $this->route('id');
        return [
//           'name' => 'bail|required|max:30|min:1|unique:games,name,' . $id,
//           'name' => 'bail|required|max:30|min:1',
//           'begin_date' => 'required',
//           'begin_time' => 'required',
//           'scale' => 'bail|required',
//           'game_type_id' => 'required',
             'course_id' => 'required',
        ];
    }

    public function messages()
    {
        return [
//            'name.required' => trans('api.NAME_REQUIRED'),
//            'name.max' => trans('api.NAME_TOO_LONG'),
//            'name.min' => trans('api.NAME_TOO_SHORT'),
//            'begin_date.required' => trans('api.BEGIN_DATE_REQUIRED'),
//            'begin_time.required' => trans('api.BEGIN_TIME_REQUIRED'),
//            'scale.required' => trans('api.SCALE_REQUIRED'),
            'course_id.required' => trans('api.COURSE_REQUIRED'),
        ];
    }
}
