Merge branch 'develop'

This commit is contained in:
mzl
2025-07-29 09:00:04 +08:00
parent a551507e4d
commit d74b374198
106 changed files with 6754 additions and 1346 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace app\common\validate;
use think\Validate;
class CorpValidate extends Validate
{
protected $rule = [
'id' => 'require|number',
'name' => 'require|max:255',
'abbr' => 'require|in:hesu,xinyouhe,paika,simate,mbaf',
'tenant_key' => 'string',
'sort' => 'number',
'status' => 'require|in:0,1'
];
protected $message = [
'id.require' => 'ID不能为空',
'id.number' => 'ID必须是数字',
'name.require' => '企业名称不能为空',
'name.max' => '企业名称长度不能超过255个字符',
'abbr.require' => '企业缩写不能为空',
'abbr.in' => '企业缩写必须是 hesu,xinyouhe,paika,simate,mbaf 中的一个',
'tenant_key.string' => '飞书企业标识必须是字符串',
'sort.number' => '排序值必须是数字',
'status.require' => '状态不能为空',
'status.in' => '状态必须是0或1'
];
protected $scene = [
'store' => ['name', 'abbr', 'tenant_key', 'sort', 'status'],
'update' => ['id', 'name', 'abbr', 'tenant_key', 'sort', 'status']
];
}