
* ⬆️ Bump tailwindcss from 2.2.14 to 2.2.15 Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 2.2.14 to 2.2.15. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * updating cal will provide a zoom meeting url * updating cal will provide a zoom meeting url * modifying how daily emails send * modifying how daily emails send * daily table * migration updates * daily table * rebasing updates * updating Daily references to a new table * updating internal notes * merge updates, adding Daily references to book/events.ts * updated video email templates to remove Daily specific references * updating the events.ts and refactoring in the event manager * removing the package-lock * changing calendso video powered by Daily.co to cal video powered by Daily.co * updating some of the internal Daily notes * added a modal for when the call/ link is invalid * removing handle errors raw from the Daily video client * prettier formatting fixes * Added the Daily location to calendar events and updated Cal video references to Daily.co video * updating references to create in event manager to check for Daily video * fixing spacing on the cancel booking modal and adding Daily references in the event manager * formatting fixes * updating the readme file * adding a daily interface in the event manager * adding daily to the location labels * added a note to cal event parser * resolving yarn merge conflicts * updating dailyReturn to DailyReturnType * removing prettier auto and refactoring integrations: daily in the event manager * removing changes to estlintrc.json * updating read me formatting * indent space for Daily ReadMe section * resolving the merge conflicts in the yarn file Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lola-Ojabowale <lola.ojabowale@gmail.com>
302 lines
8.2 KiB
Text
302 lines
8.2 KiB
Text
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
previewFeatures = ["selectRelationCount"]
|
|
}
|
|
|
|
enum SchedulingType {
|
|
ROUND_ROBIN @map("roundRobin")
|
|
COLLECTIVE @map("collective")
|
|
}
|
|
|
|
model EventType {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
slug String
|
|
description String?
|
|
locations Json?
|
|
length Int
|
|
hidden Boolean @default(false)
|
|
users User[] @relation("user_eventtype")
|
|
userId Int?
|
|
team Team? @relation(fields: [teamId], references: [id])
|
|
teamId Int?
|
|
bookings Booking[]
|
|
availability Availability[]
|
|
eventName String?
|
|
customInputs EventTypeCustomInput[]
|
|
timeZone String?
|
|
periodType String? @default("unlimited") // unlimited | rolling | range
|
|
periodStartDate DateTime?
|
|
periodEndDate DateTime?
|
|
periodDays Int?
|
|
periodCountCalendarDays Boolean?
|
|
requiresConfirmation Boolean @default(false)
|
|
disableGuests Boolean @default(false)
|
|
minimumBookingNotice Int @default(120)
|
|
schedulingType SchedulingType?
|
|
Schedule Schedule[]
|
|
price Int @default(0)
|
|
currency String @default("usd")
|
|
@@unique([userId, slug])
|
|
}
|
|
|
|
model Credential {
|
|
id Int @id @default(autoincrement())
|
|
type String
|
|
key Json
|
|
user User? @relation(fields: [userId], references: [id])
|
|
userId Int?
|
|
}
|
|
|
|
enum UserPlan {
|
|
FREE
|
|
TRIAL
|
|
PRO
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
username String? @unique
|
|
name String?
|
|
email String? @unique
|
|
emailVerified DateTime?
|
|
password String?
|
|
bio String?
|
|
avatar String?
|
|
timeZone String @default("Europe/London")
|
|
weekStart String? @default("Sunday")
|
|
startTime Int @default(0)
|
|
endTime Int @default(1440)
|
|
bufferTime Int @default(0)
|
|
hideBranding Boolean @default(false)
|
|
theme String?
|
|
createdDate DateTime @default(now()) @map(name: "created")
|
|
eventTypes EventType[] @relation("user_eventtype")
|
|
credentials Credential[]
|
|
teams Membership[]
|
|
bookings Booking[]
|
|
availability Availability[]
|
|
selectedCalendars SelectedCalendar[]
|
|
completedOnboarding Boolean? @default(false)
|
|
locale String?
|
|
twoFactorSecret String?
|
|
twoFactorEnabled Boolean @default(false)
|
|
|
|
|
|
plan UserPlan @default(PRO)
|
|
Schedule Schedule[]
|
|
|
|
@@map(name: "users")
|
|
}
|
|
|
|
model Team {
|
|
id Int @id @default(autoincrement())
|
|
name String?
|
|
slug String? @unique
|
|
logo String?
|
|
bio String?
|
|
hideBranding Boolean @default(false)
|
|
members Membership[]
|
|
eventTypes EventType[]
|
|
}
|
|
|
|
enum MembershipRole {
|
|
MEMBER
|
|
OWNER
|
|
}
|
|
|
|
model Membership {
|
|
teamId Int
|
|
userId Int
|
|
accepted Boolean @default(false)
|
|
role MembershipRole
|
|
team Team @relation(fields: [teamId], references: [id])
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
@@id([userId, teamId])
|
|
}
|
|
|
|
model VerificationRequest {
|
|
id Int @id @default(autoincrement())
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@unique([identifier, token])
|
|
}
|
|
|
|
model BookingReference {
|
|
id Int @id @default(autoincrement())
|
|
type String
|
|
uid String
|
|
meetingId String?
|
|
meetingPassword String?
|
|
meetingUrl String?
|
|
booking Booking? @relation(fields: [bookingId], references: [id])
|
|
bookingId Int?
|
|
}
|
|
|
|
model Attendee {
|
|
id Int @id @default(autoincrement())
|
|
email String
|
|
name String
|
|
timeZone String
|
|
booking Booking? @relation(fields: [bookingId], references: [id])
|
|
bookingId Int?
|
|
}
|
|
|
|
enum BookingStatus {
|
|
CANCELLED @map("cancelled")
|
|
ACCEPTED @map("accepted")
|
|
REJECTED @map("rejected")
|
|
PENDING @map("pending")
|
|
}
|
|
|
|
model DailyEventReference {
|
|
id Int @id @default(autoincrement())
|
|
dailyurl String @default("dailycallurl")
|
|
dailytoken String @default("dailytoken")
|
|
booking Booking? @relation(fields: [bookingId], references: [id])
|
|
bookingId Int?
|
|
}
|
|
|
|
model Booking {
|
|
id Int @id @default(autoincrement())
|
|
uid String @unique
|
|
user User? @relation(fields: [userId], references: [id])
|
|
userId Int?
|
|
references BookingReference[]
|
|
eventType EventType? @relation(fields: [eventTypeId], references: [id])
|
|
eventTypeId Int?
|
|
|
|
title String
|
|
description String?
|
|
startTime DateTime
|
|
endTime DateTime
|
|
|
|
attendees Attendee[]
|
|
location String?
|
|
|
|
dailyRef DailyEventReference?
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime?
|
|
confirmed Boolean @default(true)
|
|
rejected Boolean @default(false)
|
|
status BookingStatus @default(ACCEPTED)
|
|
paid Boolean @default(false)
|
|
payment Payment[]
|
|
}
|
|
|
|
model Schedule {
|
|
id Int @id @default(autoincrement())
|
|
user User? @relation(fields: [userId], references: [id])
|
|
userId Int?
|
|
eventType EventType? @relation(fields: [eventTypeId], references: [id])
|
|
eventTypeId Int?
|
|
title String?
|
|
freeBusyTimes Json?
|
|
}
|
|
|
|
model Availability {
|
|
id Int @id @default(autoincrement())
|
|
label String?
|
|
user User? @relation(fields: [userId], references: [id])
|
|
userId Int?
|
|
eventType EventType? @relation(fields: [eventTypeId], references: [id])
|
|
eventTypeId Int?
|
|
days Int[]
|
|
startTime Int
|
|
endTime Int
|
|
date DateTime? @db.Date
|
|
}
|
|
|
|
model SelectedCalendar {
|
|
user User @relation(fields: [userId], references: [id])
|
|
userId Int
|
|
integration String
|
|
externalId String
|
|
|
|
@@id([userId, integration, externalId])
|
|
}
|
|
|
|
enum EventTypeCustomInputType {
|
|
TEXT @map("text")
|
|
TEXTLONG @map("textLong")
|
|
NUMBER @map("number")
|
|
BOOL @map("bool")
|
|
}
|
|
|
|
model EventTypeCustomInput {
|
|
id Int @id @default(autoincrement())
|
|
eventTypeId Int
|
|
eventType EventType @relation(fields: [eventTypeId], references: [id])
|
|
label String
|
|
type EventTypeCustomInputType
|
|
required Boolean
|
|
placeholder String @default("")
|
|
}
|
|
|
|
model ResetPasswordRequest {
|
|
id String @id @default(cuid())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
email String
|
|
expires DateTime
|
|
}
|
|
|
|
enum ReminderType {
|
|
PENDING_BOOKING_CONFIRMATION
|
|
}
|
|
|
|
model ReminderMail {
|
|
id Int @id @default(autoincrement())
|
|
referenceId Int
|
|
reminderType ReminderType
|
|
elapsedMinutes Int
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
enum PaymentType {
|
|
STRIPE
|
|
}
|
|
|
|
model Payment {
|
|
id Int @id @default(autoincrement())
|
|
uid String @unique
|
|
type PaymentType
|
|
bookingId Int
|
|
booking Booking? @relation(fields: [bookingId], references: [id])
|
|
amount Int
|
|
fee Int
|
|
currency String
|
|
success Boolean
|
|
refunded Boolean
|
|
data Json
|
|
externalId String @unique
|
|
}
|
|
|
|
enum WebhookTriggerEvents {
|
|
BOOKING_CREATED
|
|
BOOKING_RESCHEDULED
|
|
BOOKING_CANCELLED
|
|
}
|
|
|
|
model Webhook {
|
|
id String @unique @id
|
|
userId Int
|
|
subscriberUrl String
|
|
createdAt DateTime @default(now())
|
|
active Boolean @default(true)
|
|
eventTriggers WebhookTriggerEvents[]
|
|
}
|