init
This commit is contained in:
57
application/admin/model/yq/base_config/Early.php
Normal file
57
application/admin/model/yq/base_config/Early.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\yq\base_config;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Early extends Model
|
||||
{
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'event';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
// 触发类型
|
||||
public function getTriggerTypeList()
|
||||
{
|
||||
return ['1' => __('自主触发'), '2' => __('主动上报')];
|
||||
}
|
||||
|
||||
// 事件等级
|
||||
public function getLvList()
|
||||
{
|
||||
return ['1' => __('一级(无限制)'), '2' => __('二级(120分钟)'), '3' => __('三级(60分钟)'), '4' => __('四级(30分钟)')];
|
||||
}
|
||||
|
||||
// 事件流传部门
|
||||
public function getDepartmentList()
|
||||
{
|
||||
return ['1' => __('应急'), '2' => __('交通'), '3' => __('运营')];
|
||||
}
|
||||
|
||||
// 反馈时效
|
||||
public function getFeedbackTimeList()
|
||||
{
|
||||
return ['1' => __('2小时内'), '2' => __('6小时内'), '3' => __('12小时内'), '4' => __('36小时内'), '5' => __('无限制')];
|
||||
}
|
||||
|
||||
public function type()
|
||||
{
|
||||
return $this->belongsTo('EventType', 'type_id', 'id')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user