first commit
This commit is contained in:
30
prisma/schema.prisma
Normal file
30
prisma/schema.prisma
Normal file
@@ -0,0 +1,30 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Event {
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
date String
|
||||
location String
|
||||
tickets Ticket[]
|
||||
}
|
||||
|
||||
model Ticket {
|
||||
id String @id @default(uuid())
|
||||
event Event @relation(fields: [eventId], references: [id])
|
||||
eventId String
|
||||
attendeeName String
|
||||
attendeeEmail String
|
||||
ticketType String // Enforced in application logic: "Klassenbester", "1er Schüler", "Partyborner"
|
||||
status String @default("valid") // "valid", "used"
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
Reference in New Issue
Block a user