Added online column to user and char. models, updated send chat message event to new format, removed unused code, fixed typo, replaced console.log()'s with logger

This commit is contained in:
2024-09-08 03:14:55 +02:00
parent 7682d1fd01
commit a64506d3ee
5 changed files with 56 additions and 43 deletions

View File

@ -41,6 +41,7 @@ CREATE TABLE `User` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`username` VARCHAR(191) NOT NULL,
`password` VARCHAR(191) NOT NULL,
`online` BOOLEAN NOT NULL DEFAULT false,
UNIQUE INDEX `User_username_key`(`username`),
PRIMARY KEY (`id`)
@ -64,6 +65,7 @@ CREATE TABLE `Character` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`userId` INTEGER NOT NULL,
`name` VARCHAR(191) NOT NULL,
`online` BOOLEAN NOT NULL DEFAULT false,
`hitpoints` INTEGER NOT NULL DEFAULT 100,
`mana` INTEGER NOT NULL DEFAULT 100,
`level` INTEGER NOT NULL DEFAULT 1,