From 06ccca81c969ccbf49d515e415d516c8d84ff6ad Mon Sep 17 00:00:00 2001 From: Karson Date: Fri, 27 May 2022 11:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96CRUD=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 4973a36a..390cb953 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -185,7 +185,7 @@ class Crud extends Command 'switch' => 'toggle', 'tag' => 'flag', 'tags' => 'flag', - 'time' => ['type' => ['int', 'timestamp'], 'name' => 'datetime'], + 'time' => ['type' => ['int', 'bigint', 'timestamp'], 'name' => 'datetime'], ]; /** @@ -1103,7 +1103,7 @@ class Crud extends Command 'langList' => $langList, 'softDeleteClassPath' => in_array($this->deleteTimeField, $fieldArr) ? "use traits\model\SoftDelete;" : '', 'softDelete' => in_array($this->deleteTimeField, $fieldArr) ? "use SoftDelete;" : '', - 'modelAutoWriteTimestamp' => in_array($this->createTimeField, $fieldArr) || in_array($this->updateTimeField, $fieldArr) ? "'int'" : 'false', + 'modelAutoWriteTimestamp' => in_array($this->createTimeField, $fieldArr) || in_array($this->updateTimeField, $fieldArr) ? "'integer'" : 'false', 'createTime' => in_array($this->createTimeField, $fieldArr) ? "'{$this->createTimeField}'" : 'false', 'updateTime' => in_array($this->updateTimeField, $fieldArr) ? "'{$this->updateTimeField}'" : 'false', 'deleteTime' => in_array($this->deleteTimeField, $fieldArr) ? "'{$this->deleteTimeField}'" : 'false',