Initial commit: Timepickr event scheduling app
- Next.js 14 with App Router and TypeScript - Prisma ORM with PostgreSQL database - Event creation with share links - Calendar availability selection - Password-protected analytics dashboard - Stripe-inspired UI design - Docker configuration for deployment
This commit is contained in:
32
prisma/schema.prisma
Normal file
32
prisma/schema.prisma
Normal file
@@ -0,0 +1,32 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Event {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
description String?
|
||||
startDate DateTime @db.Date
|
||||
endDate DateTime @db.Date
|
||||
shareCode String @unique
|
||||
adminPasswordHash String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
responses Response[]
|
||||
}
|
||||
|
||||
model Response {
|
||||
id String @id @default(uuid())
|
||||
eventId String
|
||||
name String
|
||||
availableDates Json // Array of date strings
|
||||
createdAt DateTime @default(now())
|
||||
event Event @relation(fields: [eventId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([eventId])
|
||||
}
|
||||
Reference in New Issue
Block a user