Active.php
632 字节
<?php
namespace app\common\model;
use think\Model;
class Active extends Model
{
// 表名
protected $name = 'activity';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
];
public function getImageAttr($value,$data){
$value = cdnurl($data['image'],true);
return $value;
}
public function getDepictAttr ($value,$data){
$value = strip_tags($data['depict']);
return $value;
}
}