mirror of https://gitee.com/karson/fastadmin.git
推流拉流model
parent
4cf807f996
commit
a9680c36bb
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Live extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'live';
|
||||
|
||||
|
||||
public function getAdvancedataList()
|
||||
{
|
||||
return ['0' => __('Advancedata 0'),'1' => __('Advancedata 1'),'2' => __('Advancedata 2'),'3' => __('Advancedata 3')];
|
||||
}
|
||||
|
||||
public function getListList()
|
||||
{
|
||||
return ['0' => __('List 0'),'1' => __('List 1'),'2' => __('List 2'),'3' => __('List 3'),'4' => __('List 4')];
|
||||
}
|
||||
|
||||
|
||||
public function getAdvancedataTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : $data['advancedata'];
|
||||
$list = $this->getAdvancedataList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getListTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : $data['list'];
|
||||
$list = $this->getListList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue