glhcp/server/app/common/model/content/Article.php

20 lines
297 B
PHP

<?php
namespace app\common\model\content;
use app\common\basics\Models;
class Article extends Models
{
/**
* @Notes: 关联文章分类模型
* @Author: 张无忌
*/
public function category()
{
return $this->hasOne('ArticleCategory', 'id', 'cid');
}
}