mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-08 08:22:27 +02:00
Squashes the current state of the internal working tree onto this history. The two trees had grown apart with no common ancestor, so this is a content sync rather than a merge, and the published history is preserved rather than rewritten — a force-push here would break every existing fork and clone to no benefit. What lands: - Waitlist: API route, core module, and migration 0006 alongside game aliases. - User verification. - CI, oxfmt config, editor settings. - Assorted fixes across the API routes and core modules. The repository's own README, the wordmark and the per-package READMEs are kept from this side; the internal tree had dropped them and they are what a stranger arriving here reads first. The marketing site in the internal tree is deliberately not here. It is a separate product with its own repo and its own licence, and this repo is the open one — a closed component does not belong in it regardless of how convenient the directory looked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import { bigint, integer, jsonb, pgTable, smallint, text, uniqueIndex } from 'drizzle-orm/pg-core';
|
|
|
|
import { id, timestamps, utc } from '../db/types.js';
|
|
|
|
export const GameTable = pgTable(
|
|
'game',
|
|
{
|
|
...id,
|
|
...timestamps,
|
|
|
|
steamAppId: integer('steam_app_id').notNull().unique(),
|
|
slug: text('slug').notNull(),
|
|
name: text('name').notNull(),
|
|
type: text('type'),
|
|
// Space-separated nicknames ("tf2", "pubg") so search can match them.
|
|
aliases: text('aliases'),
|
|
|
|
clientIcon: text('client_icon'),
|
|
icon: text('icon'),
|
|
|
|
shortDescription: text('short_description'),
|
|
description: text('description'),
|
|
|
|
developers: jsonb('developers').$type<string[]>(),
|
|
publishers: jsonb('publishers').$type<string[]>(),
|
|
primaryGenre: text('primary_genre'),
|
|
genres: jsonb('genres').$type<string[]>(),
|
|
categories: jsonb('categories').$type<string[]>(),
|
|
oslist: jsonb('oslist').$type<string[]>(),
|
|
|
|
sizeDownload: bigint('size_download', { mode: 'number' }),
|
|
sizeOnDisk: bigint('size_on_disk', { mode: 'number' }),
|
|
|
|
controllerSupport: text('controller_support'),
|
|
steamDeckCompat: text('steam_deck_compat'),
|
|
reviewScorePercent: smallint('review_score_percent'),
|
|
reviewCount: integer('review_count'),
|
|
metacriticScore: smallint('metacritic_score'),
|
|
|
|
steamChangeNumber: integer('steam_change_number'),
|
|
publicBuildId: integer('public_build_id'),
|
|
releaseDate: utc('release_date_utc'),
|
|
|
|
timeEnriched: utc('time_enriched')
|
|
},
|
|
(t) => [
|
|
uniqueIndex('game_slug_unique').on(t.slug),
|
|
uniqueIndex('game_app_id_unique').on(t.steamAppId)
|
|
]
|
|
);
|