改名
This commit is contained in:
@@ -10,14 +10,13 @@ declare(strict_types=1);
|
|||||||
namespace Database;
|
namespace Database;
|
||||||
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Database\Base\BaseActiveRecord;
|
use Database\Base\BaseActiveRecord;
|
||||||
|
use Database\Traits\HasBase;
|
||||||
|
use Exception;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Channel;
|
use Snowflake\Channel;
|
||||||
use Snowflake\Exception\ComponentException;
|
|
||||||
use Snowflake\Exception\NotFindClassException;
|
use Snowflake\Exception\NotFindClassException;
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
use Database\Traits\HasBase;
|
|
||||||
|
|
||||||
defined('SAVE_FAIL') or define('SAVE_FAIL', 3227);
|
defined('SAVE_FAIL') or define('SAVE_FAIL', 3227);
|
||||||
defined('FIND_OR_CREATE_MESSAGE') or define('FIND_OR_CREATE_MESSAGE', 'Create a new model, but the data cannot be empty.');
|
defined('FIND_OR_CREATE_MESSAGE') or define('FIND_OR_CREATE_MESSAGE', 'Create a new model, but the data cannot be empty.');
|
||||||
@@ -220,7 +219,7 @@ class ActiveRecord extends BaseActiveRecord
|
|||||||
public static function inserts(array $data): bool
|
public static function inserts(array $data): bool
|
||||||
{
|
{
|
||||||
/** @var static $class */
|
/** @var static $class */
|
||||||
$class = Snowflake::createObject(static::className());
|
$class = Snowflake::createObject(['class' => static::class]);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
return $class->addError('Insert data empty.', 'mysql');
|
return $class->addError('Insert data empty.', 'mysql');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user