<?php
namespace app\workerapi\validate;

use app\common\validate\BaseValidate;


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

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'work_sn' => 'require',
        'master_worker_id' => 'require',
        'issue_approval' => 'require',
        'responsible' => 'require',
        'complaint_details' => 'require',
        'appeal_info' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'work_sn' => '工单编号',
        'master_worker_id' => '工程师',
        'issue_approval' => '投诉审核状态',
        'responsible' => '定责',
        'complaint_details' => '投诉详情',
        'appeal_info' => '申述详情',
    ];

    /**
     * @notes 详情场景
     * @return IssueWorkValidate
     * @author whitef
     * @date 2024/07/10 15:06
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

    /**
     * @notes 详情场景
     * @return IssueWorkValidate
     * @author whitef
     * @date 2024/07/10 15:06
     */
    public function sceneApproval()
    {
        return $this->only(['id','appeal_info']);
    }

}