<?php

namespace Beike\Shop\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class InquiryRequest extends FormRequest{
    /**
     * 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(){
        return [
            'email'      => 'required',
            'contacts'   => 'required',
            'product_sku_id' => 'required|exists:product_skus,id',
            'content'    => 'required',
        ];
    }
    public function attributes(){
        return [
            'email'      => trans('inquiry.email'),
            'contacts'   => trans('inquiry.contacts'),
            'product_id' => trans('inquiry.product_id'),
            'content'    => trans('inquiry.content'),
        ];
    }
}
