feat(platform): add Discord onboarding and Velocity gate
This commit is contained in:
@@ -134,7 +134,6 @@ export const sessions = pgTable(
|
||||
|
||||
export const appSettings = pgTable("app_settings", {
|
||||
id: text("id").primaryKey().default("default"),
|
||||
discordGuildId: text("discord_guild_id"),
|
||||
registrationMessage: text("registration_message")
|
||||
.notNull()
|
||||
.default("Please register your Minecraft account before joining."),
|
||||
@@ -186,6 +185,21 @@ export const pluginCredentials = pgTable(
|
||||
(table) => [uniqueIndex("plugin_credentials_server_id_uidx").on(table.serverId)],
|
||||
);
|
||||
|
||||
export const pluginRequests = pgTable(
|
||||
"plugin_requests",
|
||||
{
|
||||
requestId: uuid("request_id").primaryKey(),
|
||||
serverId: text("server_id")
|
||||
.notNull()
|
||||
.references(() => pluginCredentials.serverId, { onDelete: "cascade" }),
|
||||
receivedAt: timestamp("received_at", { withTimezone: true, mode: "date", precision: 3 })
|
||||
.notNull()
|
||||
.defaultNow(),
|
||||
expiresAt: timestamp("expires_at", { withTimezone: true, mode: "date", precision: 3 }).notNull(),
|
||||
},
|
||||
(table) => [index("plugin_requests_expires_idx").on(table.expiresAt)],
|
||||
);
|
||||
|
||||
export const events = pgTable(
|
||||
"events",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user