<?php

namespace app\api\validate;


use app\common\validate\BaseValidate;


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

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'special_type' => 'require',
        'title' => 'require',
        'cover_type' => 'require',
        'cover' => 'require',
        'vue_web' => 'require',
        'vue_param' => 'require',
        'weight' => 'require',
        'view_num' => 'require',
        'status' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'special_type' => '专题页类别',
        'title' => '专题页名称',
        'cover_type' => '封面类型:0=图片,1=视频',
        'cover' => '封面',
        'vue_web' => '专题页地址',
        'vue_param' => '专题页参数',
        'weight' => '权重',
        'view_num' => '浏览次数',
        'status' => '状态',
    ];

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

}