Files
sentcms/app/model/AdPlace.php
tensent 5c320206fb auth
2020-02-16 10:49:43 +08:00

33 lines
719 B
PHP
Executable File

<?php
namespace app\model;
use think\Model;
class AdPlace extends Model {
protected $type = array(
'start_time' => 'timestamp',
'end_time' => 'timestamp'
);
public $show_type = array(
1 => '幻灯片',
2 => '对联',
3 => '图片列表',
4 => '图文列表',
5 => '文字列表',
6 => '代码广告'
);
public $status = array(
1 => '开启',
0 => '关闭'
);
public function getShowTypeTextAttr($value, $data){
return isset($this->show_type[$data['show_type']]) ? $this->show_type[$data['show_type']] : '未知';
}
public function getStatusTextAttr($value, $data){
return isset($this->status[$data['status']]) ? $this->status[$data['status']] : '未知';
}
}