You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
471 B
30 lines
471 B
<?php
|
|
|
|
|
|
namespace app\common\model\content;
|
|
|
|
|
|
use app\common\basics\Models;
|
|
|
|
class Resource extends Models
|
|
{
|
|
|
|
/**
|
|
* @Notes: 关联资源分类模型
|
|
* @Author:
|
|
*/
|
|
public function category()
|
|
{
|
|
return $this->hasOne('ResourceCategory', 'id', 'cid');
|
|
}
|
|
|
|
/**
|
|
* @Notes: 关联资源分类模型
|
|
* @Author:
|
|
*/
|
|
public function category2()
|
|
{
|
|
return $this->hasOne('ResourceCategory', 'id', 'cid2');
|
|
}
|
|
|
|
}
|