<?php
namespace app\api\validate;


use app\common\validate\BaseValidate;


/**
 * GoodsReviews验证器
 * Class GoodsReviewsValidate
 * @package app\api\validate
 */
class GoodsReviewsValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'sn' => 'require',
        'rating' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'sn' => '参数错误',
        'rating' => '星级',
    ];

    /**
     * @notes 添加场景
     * @return GoodsValidate
     */
    public function sceneAdd()
    {
        return $this->only(['sn','rating']);
    }
}