调整流量池数据结构

This commit is contained in:
柳清爽
2025-04-12 19:06:00 +08:00
parent 8d96110767
commit 151db81258
8 changed files with 202 additions and 106 deletions

View File

@@ -4,10 +4,45 @@ namespace app\superadmin\model;
use think\Model;
/**
* 流量池模型
* 客户池模型
*/
class TrafficPool extends Model
{
// 设置数据表名
protected $name = 'traffic_pool';
// 设置表前缀
protected $prefix = 'ck_';
// 设置主键
protected $pk = 'id';
// 自动写入时间戳
protected $autoWriteTimestamp = true;
// 定义时间戳字段名
protected $createTime = 'createTime';
protected $updateTime = 'updateTime';
// 定义字段类型
protected $type = [
'id' => 'integer',
'wechatId' => 'string',
'createTime' => 'datetime',
'updateTime' => 'integer'
];
// 定义字段验证规则
protected $rule = [
'wechatId' => 'require|max:64',
'identifier' => 'require|max:64'
];
// 定义字段验证提示信息
protected $message = [
'wechatId.require' => '微信ID不能为空',
'wechatId.max' => '微信ID最多不能超过64个字符',
'identifier.require' => '标识符不能为空',
'identifier.max' => '标识符最多不能超过64个字符'
];
}