<?php


namespace app\admin\validate;


class KeywordValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'keyword_id' => 'integer|min:0',
        'name' => 'require|length:1,200',
        'status' => 'integer|min:0',
        'weight' => 'integer|min:0',
    ];
    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'keyword_id' => '关键词ID',
        'name' => '名称',
        'status' => '状态',
        'weight' => '权重',
    ];

    /**
     * @notes 编辑场景
     */
    public function sceneEdit()
    {
        return $this->only(['keyword_id', 'name', 'status', 'weight','language_code']);
    }

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

}