<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\training;


use app\common\validate\BaseValidate;


/**
 * TrainingWorkerCourse验证器
 * Class TrainingWorkerCourseValidate
 * @package app\adminapi\validate
 */
class TrainingWorkerCourseValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'master_worker_id' => 'require',
        'training_task_id' => 'require',
        'training_course_id' => 'require',
        'play_time' => 'require',
        'exam_start_time' => 'require',
        'exam_end_time' => 'require',
        'study_status' => 'require',
        'question_all_score' => 'require',
        'question_qualified_score' => 'require',
        'exam_score' => 'require',

    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'master_worker_id' => '师傅id',
        'training_task_id' => '培训任务ID',
        'training_course_id' => '课程ID',
        'play_time' => '播放时间秒',
        'exam_start_time' => '考试开始时间秒',
        'exam_end_time' => '考试结束时间秒',
        'study_status' => '状态 0未学习  1学习中  2待考试  3考试中  4考试不合格   5已学完',
        'question_all_score' => '试题总分',
        'question_qualified_score' => '合格分',
        'exam_score' => '实际考试得分',

    ];


    /**
     * @notes 添加场景
     * @return TrainingWorkerCourseValidate
     * @author likeadmin
     * @date 2025/02/16 16:44
     */
    public function sceneAdd()
    {
        return $this->only(['master_worker_id','training_task_id','training_course_id','play_time','exam_start_time','exam_end_time','study_status','question_all_score','question_qualified_score','exam_score']);
    }


    /**
     * @notes 编辑场景
     * @return TrainingWorkerCourseValidate
     * @author likeadmin
     * @date 2025/02/16 16:44
     */
    public function sceneEdit()
    {
        return $this->only(['id','master_worker_id','training_task_id','training_course_id','play_time','exam_start_time','exam_end_time','study_status','question_all_score','question_qualified_score','exam_score']);
    }


    /**
     * @notes 删除场景
     * @return TrainingWorkerCourseValidate
     * @author likeadmin
     * @date 2025/02/16 16:44
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return TrainingWorkerCourseValidate
     * @author likeadmin
     * @date 2025/02/16 16:44
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}