feat: Made design more responsive
fix: Made blurring server side to help with performance fix: Fixed shortcut useEffect loop
This commit is contained in:
parent
b4a89385d0
commit
9e4b2a02c1
38 changed files with 583 additions and 329 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { sql } from "drizzle-orm";
|
||||
import { sql, relations } from "drizzle-orm";
|
||||
import { integer, text, sqliteTable, blob } from "drizzle-orm/sqlite-core";
|
||||
|
||||
export const games = sqliteTable('games', {
|
||||
|
|
@ -19,6 +19,14 @@ export const games = sqliteTable('games', {
|
|||
summary: text("summary")
|
||||
});
|
||||
|
||||
export const gamesRelations = relations(games, ({ many, one }) => ({
|
||||
screenshots: many(screenshots),
|
||||
platform: one(platforms, {
|
||||
fields: [games.id],
|
||||
references: [platforms.id]
|
||||
})
|
||||
}));
|
||||
|
||||
export const platforms = sqliteTable('platforms', {
|
||||
id: integer("id").primaryKey({ autoIncrement: true }),
|
||||
igdb_id: integer("igdb_id").unique(),
|
||||
|
|
@ -35,6 +43,8 @@ export const platforms = sqliteTable('platforms', {
|
|||
family_name: text("family_name")
|
||||
});
|
||||
|
||||
export const platformsRelations = relations(platforms, ({ many }) => ({ games: many(games) }));
|
||||
|
||||
export const collections_games = sqliteTable('collections_games', {
|
||||
collection_id: integer('collection_id').notNull().references(() => collections.id, { onDelete: 'cascade', onUpdate: 'cascade' }),
|
||||
game_id: integer('game_id').notNull().references(() => games.id, { onDelete: 'cascade', onUpdate: 'cascade' }),
|
||||
|
|
@ -51,4 +61,11 @@ export const screenshots = sqliteTable('screenshots', {
|
|||
game_id: integer('game_id').references(() => games.id, { onDelete: 'cascade', onUpdate: 'cascade' }),
|
||||
content: blob('content', { mode: 'buffer' }).notNull(),
|
||||
type: text('type')
|
||||
});
|
||||
});
|
||||
|
||||
export const screenshotsRelations = relations(screenshots, ({ one }) => ({
|
||||
game: one(games, {
|
||||
fields: [screenshots.game_id],
|
||||
references: [games.id]
|
||||
})
|
||||
}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue