40 lines
611 B
PHP
40 lines
611 B
PHP
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\common\model\system\diy;
|
|
|
|
use app\common\model\BaseModel;
|
|
|
|
class PageLink extends BaseModel
|
|
{
|
|
|
|
public static function tablePk(): string
|
|
{
|
|
return 'id';
|
|
}
|
|
|
|
public static function tableName(): string
|
|
{
|
|
return 'page_link';
|
|
}
|
|
|
|
public function category()
|
|
{
|
|
return $this->hasOne(PageCategory::class,'id', 'cate_id');
|
|
}
|
|
|
|
public function searchIsMerAttr($query, $value)
|
|
{
|
|
$query->where('is_mer', $value);
|
|
}
|
|
|
|
public function searchStatusAttr($query,$value)
|
|
{
|
|
$query->where('status',$value);
|
|
}
|
|
|
|
|
|
}
|