-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced "player" table by "lgUser" table and changed existing tables…
… schemas to a more complete version. Also added a custom logger and modified "lg" namespace and "create-game" command.
- Loading branch information
Showing
5 changed files
with
119 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as app from "#app" | ||
|
||
export interface LGUser { | ||
_id: string | ||
discordId: number | ||
username: string | ||
created_at: number | ||
nickname: string | ||
wallet: object | ||
level: number | ||
games: object | ||
friends: object | ||
guild: object | ||
hated: object | ||
is_admin: boolean | ||
} | ||
|
||
export default new app.Table<LGUser>({ | ||
name: "player", | ||
setup: (table) => { | ||
table.string("_id").primary() | ||
table.bigInteger("discordId").unique().notNullable() | ||
table.string("username").defaultTo("") | ||
table.bigInteger("created_at").notNullable() | ||
table.string("nickname").defaultTo("") | ||
table.jsonb("wallet").defaultTo({}) | ||
table.integer("level").defaultTo(0) | ||
table.jsonb("games").defaultTo({}) | ||
table.jsonb("friends").defaultTo({}) | ||
table.jsonb("guild").defaultTo({}) | ||
table.jsonb("hated").defaultTo({}) | ||
table.boolean("is_admin").defaultTo(false) | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.