mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 19:06:42 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -1,34 +1,36 @@
|
|||
import {
|
||||
pgTable,
|
||||
uuid,
|
||||
date,
|
||||
integer,
|
||||
decimal,
|
||||
text,
|
||||
timestamp,
|
||||
index,
|
||||
unique,
|
||||
pgTable,
|
||||
uuid,
|
||||
date,
|
||||
integer,
|
||||
decimal,
|
||||
text,
|
||||
timestamp,
|
||||
index,
|
||||
unique,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
|
||||
export const dailyProgress = pgTable(
|
||||
'daily_progress',
|
||||
{
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
userId: uuid('user_id').notNull(),
|
||||
date: date('date').notNull(),
|
||||
cardsStudied: integer('cards_studied').default(0).notNull(),
|
||||
timeSpentMinutes: integer('time_spent_minutes').default(0).notNull(),
|
||||
accuracyPercentage: decimal('accuracy_percentage', { precision: 5, scale: 2 }).default('0').notNull(),
|
||||
decksStudied: text('decks_studied').array().default([]),
|
||||
sessionsCompleted: integer('sessions_completed').default(0).notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
},
|
||||
(table) => [
|
||||
index('idx_daily_progress_user_id').on(table.userId),
|
||||
index('idx_daily_progress_date').on(table.date),
|
||||
unique('unique_user_date').on(table.userId, table.date),
|
||||
]
|
||||
'daily_progress',
|
||||
{
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
userId: uuid('user_id').notNull(),
|
||||
date: date('date').notNull(),
|
||||
cardsStudied: integer('cards_studied').default(0).notNull(),
|
||||
timeSpentMinutes: integer('time_spent_minutes').default(0).notNull(),
|
||||
accuracyPercentage: decimal('accuracy_percentage', { precision: 5, scale: 2 })
|
||||
.default('0')
|
||||
.notNull(),
|
||||
decksStudied: text('decks_studied').array().default([]),
|
||||
sessionsCompleted: integer('sessions_completed').default(0).notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
},
|
||||
(table) => [
|
||||
index('idx_daily_progress_user_id').on(table.userId),
|
||||
index('idx_daily_progress_date').on(table.date),
|
||||
unique('unique_user_date').on(table.userId, table.date),
|
||||
]
|
||||
);
|
||||
|
||||
export type DailyProgress = typeof dailyProgress.$inferSelect;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue