Skip to content

Commit

Permalink
Schema for registrants (#495)
Browse files Browse the repository at this point in the history
* Core Mailer

* Schema for registrants
  • Loading branch information
alllenshibu authored Oct 12, 2024
1 parent ea9749d commit 3fe7553
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10,783 deletions.
43 changes: 34 additions & 9 deletions packages/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ model Event {
}

model Registrant {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
firstName String
lastName String?
email String
phone String?
eventId String @db.Uuid
event Event @relation(fields: [eventId], references: [id])
organizationId String
organization Organization @relation(fields: [organizationId], references: [id])
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
firstName String
lastName String?
email String
phone String?
eventId String @db.Uuid
event Event @relation(fields: [eventId], references: [id])
organizationId String
organization Organization @relation(fields: [organizationId], references: [id])
registrantAttributes RegistrantAttributes[]
registrantExtras RegistrantExtras[]
}

model Participant {
Expand Down Expand Up @@ -123,6 +125,18 @@ model Attributes {
eventId String @db.Uuid
event Event @relation(fields: [eventId], references: [id])
participantAttributes ParticipantAttributes[]
registrantAttributes RegistrantAttributes[]
}

model RegistrantAttributes {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
value String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
registrantId String @db.Uuid
registrant Registrant @relation(fields: [registrantId], references: [id])
attributeId String @db.Uuid
attribute Attributes @relation(fields: [attributeId], references: [id])
}

model ParticipantAttributes {
Expand All @@ -147,6 +161,17 @@ model Extras {
event Event @relation(fields: [eventId], references: [id])
participantExtras ParticipantExtras[]
participantExtrasCheckIn ParticipantExtrasCheckIn[]
registrantExtras RegistrantExtras[]
}

model RegistrantExtras {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
registrantId String @db.Uuid
registrant Registrant @relation(fields: [registrantId], references: [id])
extraId String @db.Uuid
extra Extras @relation(fields: [extraId], references: [id])
}

model ParticipantExtras {
Expand Down
10 changes: 0 additions & 10 deletions packages/tsconfig/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3fe7553

Please sign in to comment.