<?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\export;


use app\common\validate\BaseValidate;


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

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'download_type' => 'require',
        'download_fun' => 'require',
        'name' => 'require',
        'down_num' => 'require',
        'status' => 'require',
        'generate_status' => 'require',
        'clear_status' => 'require',
        'admin_id' => 'require',
        'createtime' => 'require',
        'updatetime' => 'require',

    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'download_type' => '下载类型:0=无,1=最后结算余额',
        'download_fun' => '执行方法',
        'name' => '文件名称',
        'down_num' => '下载次数',
        'status' => '是否过期:0=未到期,1=已到期',
        'generate_status' => '生成状态:0=文件生成中,1=文件生成完成,2=文件生成失败',
        'clear_status' => '清理状态:0=未清理,1=已清理',
        'admin_id' => '操作人',
        'createtime' => '创建时间',
        'updatetime' => '修改时间',

    ];


    /**
     * @notes 添加场景
     * @return ExportValidate
     * @author likeadmin
     * @date 2024/11/18 13:31
     */
    public function sceneAdd()
    {
        return $this->only(['download_type','download_fun','name','down_num','status','generate_status','clear_status','admin_id','createtime','updatetime']);
    }


    /**
     * @notes 编辑场景
     * @return ExportValidate
     * @author likeadmin
     * @date 2024/11/18 13:31
     */
    public function sceneEdit()
    {
        return $this->only(['id','download_type','download_fun','name','down_num','status','generate_status','clear_status','admin_id','createtime','updatetime']);
    }


    /**
     * @notes 删除场景
     * @return ExportValidate
     * @author likeadmin
     * @date 2024/11/18 13:31
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return ExportValidate
     * @author likeadmin
     * @date 2024/11/18 13:31
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}