<?php
/**
 * @Copyright (c) 2019  XIGU Inc. All rights reserved.
 * @Link https://www.vlcms.com
 * @License江苏溪谷网络科技有限公司版权所有
 */

namespace app\common\validate;

use think\Validate;

class Welfare extends Validate
{

    protected $rule = [
            'name' => 'require',
            'required' => 'require',
    ];

    protected $message = [
            'name' => ['require' => '缺少name'],
            'required' => ['require' => '缺少required'],
    ];

    public function sceneCreate()
    {
        return $this -> only(['name', 'required']);
    }

    public function sceneUpdate()
    {
        return $this -> only(['id', 'name', 'required']) -> append('id', 'require');
    }


}