<?php


namespace app\admin\validate;


class ComplaintValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'name' => 'require|length:1,100',
        'result' => 'length:0,255',
        'weight' => 'require|integer|min:0',
    ];

    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'name' => '投诉项',
        'result' => '处理结果',
        'weight' => '权重',
    ];

    /**
     * @notes 编辑场景
     */
    public function sceneEdit()
    {
        return $this->only(['id', 'result']);
    }

    public function sceneId()
    {
        return $this->only(['id']);
    }

}