日常更新
This commit is contained in:
@@ -3,7 +3,31 @@ namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class AdPlace extends 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']] : '未知';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user