33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
||
|
||
// +----------------------------------------------------------------------
|
||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||
// +----------------------------------------------------------------------
|
||
// | Author: CRMEB Team <admin@crmeb.com>
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\admin\model\store;
|
||
|
||
use think\Model;
|
||
use app\admin\model\StoreCategory;
|
||
|
||
class ProductCate extends Model
|
||
{
|
||
protected $connection = 'shop';
|
||
protected $table = 'eb_store_product_cate';
|
||
|
||
public function category()
|
||
{
|
||
return $this->hasOne(StoreCategory::class,'store_category_id','mer_cate_id')->field('store_category_id, cate_name');
|
||
}
|
||
|
||
public function searchProductIdAttr($query, $value)
|
||
{
|
||
$query->where('product_id',$value);
|
||
}
|
||
}
|