mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
模型注释
This commit is contained in:
@@ -15,13 +15,19 @@ use think\db\Query;
|
||||
use think\Exception;
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* Class Relation
|
||||
* @package think\model
|
||||
*
|
||||
* @mixin Query
|
||||
*/
|
||||
abstract class Relation
|
||||
{
|
||||
// 父模型对象
|
||||
protected $parent;
|
||||
/** @var Model 当前关联的模型类 */
|
||||
protected $model;
|
||||
// 关联模型查询对象
|
||||
/** @var Query 关联模型查询对象 */
|
||||
protected $query;
|
||||
// 关联表外键
|
||||
protected $foreignKey;
|
||||
@@ -65,7 +71,7 @@ abstract class Relation
|
||||
/**
|
||||
* 封装关联数据集
|
||||
* @access public
|
||||
* @param array $resultSet 数据集
|
||||
* @param array $resultSet 数据集
|
||||
* @return mixed
|
||||
*/
|
||||
protected function resultSetBuild($resultSet)
|
||||
@@ -84,6 +90,13 @@ abstract class Relation
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行基础查询(进执行一次)
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
abstract protected function baseQuery();
|
||||
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if ($this->query) {
|
||||
|
||||
Reference in New Issue
Block a user