- Added 'onDelete' and 'onNotes' support to TaskItem. - Implemented hover actions (Delete and Notes icons) for tasks. - Added Notes Modal for editing task markdown content. - Simplified navigation animation to remove blank flash (single-phase slide-in). - Fixed syntax error in updateTask function. - Updated styles for modal and task actions.
98 lines
2.5 KiB
Plaintext
98 lines
2.5 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
email String @unique
|
|
passwordHash String? // Optional for SSO users
|
|
name String?
|
|
image String?
|
|
emailVerified DateTime?
|
|
verifiedAt DateTime?
|
|
emailVerificationToken String?
|
|
emailVerificationExpires DateTime?
|
|
passwordResetToken String?
|
|
passwordResetExpires DateTime?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
accounts Account[]
|
|
sessions Session[]
|
|
tasks Task[]
|
|
calendarConnections CalendarConnection[]
|
|
}
|
|
|
|
model Account {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
type String
|
|
provider String
|
|
providerAccountId String
|
|
refresh_token String? @db.Text
|
|
access_token String? @db.Text
|
|
expires_at Int?
|
|
token_type String?
|
|
scope String?
|
|
id_token String? @db.Text
|
|
session_state String?
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([provider, providerAccountId])
|
|
}
|
|
|
|
model Session {
|
|
id String @id @default(cuid())
|
|
sessionToken String @unique
|
|
userId String
|
|
expires DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model VerificationToken {
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
|
|
@@unique([identifier, token])
|
|
}
|
|
|
|
model Task {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
title String
|
|
description String?
|
|
markdownContent String? @db.Text
|
|
completed Boolean @default(false)
|
|
order Int @default(0)
|
|
dayOfWeek Int? // 0-6 for Sunday-Saturday
|
|
somedayListId String?
|
|
originalDate DateTime?
|
|
startTime String?
|
|
endTime String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@index([userId, dayOfWeek])
|
|
@@index([userId, somedayListId])
|
|
}
|
|
|
|
model CalendarConnection {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
provider String
|
|
accessToken String
|
|
refreshToken String?
|
|
expiresAt DateTime?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
} |