mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 02:22:48 +08:00
调整admin下的类库代码,将主要逻辑调整到extend下
This commit is contained in:
@@ -1,26 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use base\admin\model\MallGoodsClass;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
class MallGoods extends TimeModel
|
||||
class MallGoods extends MallGoodsClass
|
||||
{
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function cate()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\MallCate', 'cate_id', 'id');
|
||||
}
|
||||
|
||||
public function getTagListTitleAttr()
|
||||
{
|
||||
$tags = $this->getAttr('tag');
|
||||
|
||||
$list_tag = MallTag::whereIn('id', $tags)->column('title');
|
||||
|
||||
return $list_tag;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user