30 lines
699 B
PHP
30 lines
699 B
PHP
<?php
|
|
|
|
namespace Yunshop\GoodsAssistant\models;
|
|
|
|
use app\common\models\BaseModel;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Yunshop\GoodsAssistant\models\Category;
|
|
|
|
class CategoryLog extends BaseModel
|
|
{
|
|
use SoftDeletes;
|
|
public $table = 'yz_official_account_import_category_log';
|
|
public $timestamps = true;
|
|
protected $guarded = ['id'];
|
|
|
|
|
|
/**
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
|
*/
|
|
public function importedCategory()
|
|
{
|
|
return $this->hasOne(Category::class, 'id', 'imported_category_id');
|
|
}
|
|
|
|
public function sonCategory()
|
|
{
|
|
return $this->hasOne(Category::class, 'id', 'nowaday_category_id');
|
|
}
|
|
} |