// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author:kane < chengjin005@163.com>
// +----------------------------------------------------------------------
namespace app\opera\model;
use think\Model;
class OperaPersonPostModel extends Model
{
public function operaPosts()
{
return $this->hasMany('app\opera\model\OperaPostModel', 'id', 'post_id');//post_id在本表
}
public function operaPersons(){
return $this->belongsTo('app\opera\model\OperaPersonModel','person_id','id');//person_id在本表
}
}