存客宝应用接口初始化

This commit is contained in:
Ghost
2026-01-05 10:25:32 +08:00
parent fa37227954
commit 02797ba50a
414 changed files with 85530 additions and 75 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace app\cunkebao\validate;
use think\Validate;
/**
* 分销渠道验证器
*/
class DistributionChannel extends Validate
{
protected $rule = [
'name' => 'require|length:1,50',
'phone' => 'regex:^1[3-9]\d{9}$',
'wechatId' => 'max:50',
'remarks' => 'max:200',
];
protected $message = [
'name.require' => '渠道名称不能为空',
'name.length' => '渠道名称长度必须在1-50个字符之间',
'phone.regex' => '手机号格式不正确请输入11位数字且以1开头',
'wechatId.max' => '微信号长度不能超过50个字符',
'remarks.max' => '备注信息长度不能超过200个字符',
];
protected $scene = [
'create' => ['name', 'phone', 'wechatId', 'remarks'],
];
}