35 lines
845 B
PHP
35 lines
845 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace app\adminapi\validate\qywx;
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
/**
|
|
* 企业微信客户验证器
|
|
*/
|
|
class CustomerValidate extends BaseValidate
|
|
{
|
|
protected $rule = [
|
|
'auto_sync' => 'require|boolean',
|
|
'interval' => 'require|integer|between:3600,86400',
|
|
];
|
|
|
|
protected $message = [
|
|
'auto_sync.require' => '请选择是否自动同步',
|
|
'auto_sync.boolean' => '自动同步参数格式错误',
|
|
'interval.require' => '请选择同步间隔',
|
|
'interval.integer' => '同步间隔必须为整数',
|
|
'interval.between' => '同步间隔必须在1小时到24小时之间',
|
|
];
|
|
|
|
/**
|
|
* @notes 同步设置场景
|
|
*/
|
|
public function sceneSyncSettings()
|
|
{
|
|
return $this->only(['auto_sync', 'interval']);
|
|
}
|
|
}
|