mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修正Model类
This commit is contained in:
@@ -28,8 +28,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
protected static $table;
|
protected static $table;
|
||||||
// 回调事件
|
// 回调事件
|
||||||
protected static $event = [];
|
protected static $event = [];
|
||||||
// 数据库操作对象
|
|
||||||
protected $db;
|
|
||||||
|
|
||||||
// 数据表主键 复合主键使用数组定义
|
// 数据表主键 复合主键使用数组定义
|
||||||
protected $pk = 'id';
|
protected $pk = 'id';
|
||||||
@@ -89,7 +87,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
$this->name = basename(str_replace('\\', '/', get_class($this)));
|
$this->name = basename(str_replace('\\', '/', get_class($this)));
|
||||||
$this->db = self::db();
|
|
||||||
|
|
||||||
$this->initialize();
|
$this->initialize();
|
||||||
$this->relation = new Relation($this);
|
$this->relation = new Relation($this);
|
||||||
|
|||||||
Reference in New Issue
Block a user