mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进数据表字段缓存生成 模型为抽象类或者 没有继承Model类 不生成字段缓存
This commit is contained in:
@@ -84,7 +84,8 @@ class Schema extends Command
|
||||
|
||||
protected function buildModelSchema($class)
|
||||
{
|
||||
if ($class instanceof \think\Model) {
|
||||
$reflect = new \ReflectionClass($class);
|
||||
if (!$reflect->isAbstract() && $reflect->isSubclassOf('\think\Model')) {
|
||||
$table = $class::getTable();
|
||||
$dbName = $class::getConfig('database');
|
||||
$content = '<?php ' . PHP_EOL . 'return ';
|
||||
|
||||
Reference in New Issue
Block a user