feat: GeneralAccessLog 구조 변경

- 기본값 최대한 많이 사용
This commit is contained in:
2023-07-07 10:57:51 +00:00
parent f8cc0c9c92
commit 39ca3e2bb9
2 changed files with 9 additions and 8 deletions
+3 -2
View File
@@ -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,
+6 -6
View File
@@ -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`)