36 lines
735 B
PHP
Executable File
36 lines
735 B
PHP
Executable File
<?php
|
|
/**
|
|
* 商品品牌模型
|
|
*/
|
|
|
|
namespace app\common\model;
|
|
|
|
use think\model\concern\SoftDelete;
|
|
|
|
class GoodsBrand extends Model
|
|
{
|
|
use SoftDelete;
|
|
public $softDelete = true;
|
|
protected $name = 'goods_brand';
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
//可搜索字段
|
|
protected $searchField = ['name',];
|
|
|
|
//是否显示:1-是.0-否获取器
|
|
public function getIsShowTextAttr($value, $data)
|
|
{
|
|
return self::BOOLEAN_TEXT[$data['is_show']];
|
|
}//删除时间获取器
|
|
public function getDeleteTimeAttr($value)
|
|
{
|
|
return date('Y-m-d H:i:s',$value);
|
|
}
|
|
|
|
//删除时间修改器
|
|
public function setDeleteTimeAttr($value)
|
|
{
|
|
return strtotime($value);
|
|
}
|
|
}
|