From 76a40a798b4e52caf4a052685b64721b68c07568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 17 Apr 2023 16:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GiiBase.php | 1 + GiiController.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/GiiBase.php b/GiiBase.php index a4bdf70..d1110f8 100644 --- a/GiiBase.php +++ b/GiiBase.php @@ -38,6 +38,7 @@ abstract class GiiBase 'int' => ['tinyint', 'smallint', 'mediumint', 'int', 'bigint'], 'string' => ['char', 'varchar', 'tinytext', 'text', 'mediumtext', 'longtext', 'enum'], 'date' => ['date'], + 'json' => ['json'], 'time' => ['time'], 'year' => ['year'], 'datetime' => ['datetime'], diff --git a/GiiController.php b/GiiController.php index 5cbbbae..7dea55f 100644 --- a/GiiController.php +++ b/GiiController.php @@ -546,6 +546,14 @@ use Kiri\Router\Annotate\AutoController; ', }; + } else if ($_key == 'json') { + $class .= ' + /** + * ' . (empty($comment) ? '这批懒的很,没写注释' : $comment) . ' + */ + public ?array $' . $val['Field'] . ' = null; + +'; } else { if (isset($number[0])) { if (strpos(',', $number[0])) {