dggmyyc/application/common/model/Article.php

34 lines
640 B
PHP
Executable File

<?php
/**
* 文章管理333333模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class Article extends Model
{
use SoftDelete;
public $softDelete = true;
protected $name = 'article';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = ['name','description',];
//是否置顶获取器
public function getIsTopTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['is_top']];
}//是否热门获取器
public function getIsHotTextAttr($value, $data)
{
return self::BOOLEAN_TEXT[$data['is_hot']];
}
}