<?php
namespace app\api\validate;

use app\common\validate\BaseValidate;


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

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


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'sn' => '订单编号',
        'complaint_type' => '投诉类别',
        'complaint_details' => '投诉详情',
        'complaint_images' => '投诉视频',
        'id'=>'参数'
    ];

    /**
     * @notes 检查场景
     * @return IssueWorkValidate
     */
    public function sceneIsCheck()
    {
        return $this->only(['sn']);
    }

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

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