Replies: 1 comment 5 replies
-
@one2code My This is our database schema: model User {
id String @id @default(uuid())
firstName String?
lastName String?
email String @unique
phone String?
role Role @default(USER)
eventRegistrationCompleted Boolean @default(false)
communityEvents CommunityEvent[]
}
model EventType {
id String @id @default(uuid())
type String
description String?
active Boolean @default(false)
events CommunityEvent[]
}
// Full template timezone > DateTime implementation
model CommunityEvent {
eventType EventType @relation(fields: [typeId], references: [id])
id String @id @default(uuid())
typeId String
ideaConfirmed Boolean @default(false)
organizerId String
organizer User @relation(fields: [organizerId], references: [id])
date DateTime
inPersonEvent Boolean @default(false)
onlineEvent Boolean @default(false)
notes String?
venue String?
venueContactName String?
venueContactPhone String?
venueContactEmail String?
announcementPosted Boolean @default(false)
signUpFormSent Boolean @default(false)
volunteersNeeded Int
volunteerRequestsSent Boolean @default(false)
} Hence, I would design the
I'm cool if you aren't happy with this structure. I was given a green-light to organize the backend however I want if I will be the first one to create the API. |
Beta Was this translation helpful? Give feedback.
-
@0916dhkim @DaleOrders @anjolaoluwaakindipe @1234tgk
Since we are in the early days of the project, I think it's important to hash out a backend folder structure before we get too deep into the weeds. Based on the natural flow thus far, I think the folder structure here + a folder for the serializer's
/serial
could work. Or we continue with the module split's for each api, but the drawback to this is repetition in file creation.Beta Was this translation helpful? Give feedback.
All reactions