mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Relation类方法调整
This commit is contained in:
@@ -13,6 +13,7 @@ namespace think\model;
|
|||||||
|
|
||||||
use think\db\Query;
|
use think\db\Query;
|
||||||
use think\Exception;
|
use think\Exception;
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
abstract class Relation
|
abstract class Relation
|
||||||
{
|
{
|
||||||
@@ -40,15 +41,27 @@ abstract class Relation
|
|||||||
/**
|
/**
|
||||||
* 获取关联的所属模型
|
* 获取关联的所属模型
|
||||||
* @access public
|
* @access public
|
||||||
|
* @return Model
|
||||||
*/
|
*/
|
||||||
public function getModel()
|
public function getParent()
|
||||||
{
|
{
|
||||||
return $this->parent;
|
return $this->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前的关联模型类
|
||||||
|
* @access public
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getModel()
|
||||||
|
{
|
||||||
|
return $this->model;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取关联的查询对象
|
* 获取关联的查询对象
|
||||||
* @access public
|
* @access public
|
||||||
|
* @return Query
|
||||||
*/
|
*/
|
||||||
public function getQuery()
|
public function getQuery()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user