playcademy 0.14.13 → 0.14.14-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +0,0 @@
1
- /**
2
- * Scores Schema
3
- *
4
- * Define game score tables here using Drizzle ORM.
5
- */
6
-
7
- import { relations } from 'drizzle-orm'
8
- import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'
9
-
10
- import { users } from './users'
11
-
12
- /**
13
- * Scores table
14
- *
15
- * Tracks game scores per user with level information
16
- */
17
- export const scores = sqliteTable('scores', {
18
- /** Unique score ID */
19
- id: integer('id').primaryKey({ autoIncrement: true }),
20
- /** Reference to user who earned this score */
21
- userId: integer('user_id')
22
- .notNull()
23
- .references(() => users.id),
24
- /** Score value (points earned) */
25
- score: integer('score').notNull(),
26
- /** Level where score was earned */
27
- level: integer('level').notNull(),
28
- /** Timestamp when score was created */
29
- createdAt: text('created_at').notNull(),
30
- })
31
-
32
- /**
33
- * Score relations
34
- *
35
- * Defines how scores relate to users (many-to-one)
36
- */
37
- export const scoresRelations = relations(scores, ({ one }) => ({
38
- user: one(users, {
39
- fields: [scores.userId],
40
- references: [users.id],
41
- }),
42
- }))
43
-
@@ -1,23 +0,0 @@
1
- /**
2
- * Users Schema
3
- *
4
- * Define user-related tables here using Drizzle ORM.
5
- */
6
-
7
- import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'
8
-
9
- /**
10
- * Users table
11
- *
12
- * Stores basic user information
13
- */
14
- export const users = sqliteTable('users', {
15
- /** Unique user ID */
16
- id: integer('id').primaryKey({ autoIncrement: true }),
17
- /** User's display name */
18
- name: text('name').notNull(),
19
- /** Timestamp when user was created */
20
- createdAt: text('created_at').notNull(),
21
- /** Timestamp when user was last updated */
22
- updatedAt: text('updated_at').notNull(),
23
- })