From 39ca3e2bb9b6dd8d747bc1efc3c7d1e513afe581 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 4 Jul 2023 16:56:12 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20GeneralAccessLog=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20-=20=EA=B8=B0=EB=B3=B8=EA=B0=92=20?= =?UTF-8?q?=EC=B5=9C=EB=8C=80=ED=95=9C=20=EB=A7=8E=EC=9D=B4=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/DTO/GeneralAccessLog.php | 5 +++-- hwe/sql/schema.sql | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hwe/sammo/DTO/GeneralAccessLog.php b/hwe/sammo/DTO/GeneralAccessLog.php index 35898da0..6e4924b8 100644 --- a/hwe/sammo/DTO/GeneralAccessLog.php +++ b/hwe/sammo/DTO/GeneralAccessLog.php @@ -20,7 +20,8 @@ class GeneralAccessLog extends \LDTO\DTO public ?int $userID, #[RawName('nation_id')] - public int $nationID, + #[NullIsUndefined] + public ?int $nationID, #[RawName('last_refresh')] #[Convert(DateTimeConverter::class)] @@ -28,7 +29,7 @@ class GeneralAccessLog extends \LDTO\DTO #[RawName('last_connect')] #[Convert(DateTimeConverter::class)] - public \DateTimeImmutable $lastConnect, + public ?\DateTimeImmutable $lastConnect, #[RawName('login_total')] public int $loginTotal, diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql index b99b3239..834e5c2b 100644 --- a/hwe/sql/schema.sql +++ b/hwe/sql/schema.sql @@ -106,12 +106,12 @@ CREATE TABLE `general_access_log` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `general_id` INT(11) NOT NULL, `user_id` INT(11) NULL DEFAULT NULL, - `nation_id` INT(11) NOT NULL, - `last_refresh` DATETIME NOT NULL, - `last_connect` DATETIME NOT NULL, - `login_total` INT(11) NOT NULL, - `refresh` INT(11) NOT NULL, - `refresh_total` INT(11) NOT NULL, + `nation_id` INT(11) NULL DEFAULT NULL, + `last_refresh` DATETIME NULL DEFAULT NULL, + `last_connect` DATETIME NULL DEFAULT NULL, + `login_total` INT(11) NOT NULL DEFAULT '0', + `refresh` INT(11) NOT NULL DEFAULT '0', + `refresh_total` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE INDEX `general_id` (`general_id`), INDEX `nation_id` (`nation_id`)