Makes fields with default values non-optional (#892)

pull/893/head^2
Omar López 2021-10-10 11:48:21 -06:00 committed by GitHub
parent fdd4bd2e14
commit bcf20914d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,12 @@ enum SchedulingType {
COLLECTIVE @map("collective") COLLECTIVE @map("collective")
} }
enum PeriodType {
unlimited
rolling
range
}
model EventType { model EventType {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
title String title String
@ -33,7 +39,7 @@ model EventType {
eventName String? eventName String?
customInputs EventTypeCustomInput[] customInputs EventTypeCustomInput[]
timeZone String? timeZone String?
periodType String? @default("unlimited") // unlimited | rolling | range periodType PeriodType @default(unlimited) // unlimited | rolling | range
periodStartDate DateTime? periodStartDate DateTime?
periodEndDate DateTime? periodEndDate DateTime?
periodDays Int? periodDays Int?
@ -43,8 +49,8 @@ model EventType {
minimumBookingNotice Int @default(120) minimumBookingNotice Int @default(120)
schedulingType SchedulingType? schedulingType SchedulingType?
Schedule Schedule[] Schedule Schedule[]
price Int @default(0) price Int @default(0)
currency String @default("usd") currency String @default("usd")
@@unique([userId, slug]) @@unique([userId, slug])
} }
@ -66,13 +72,13 @@ model User {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
username String? @unique username String? @unique
name String? name String?
email String? @unique email String @unique
emailVerified DateTime? emailVerified DateTime?
password String? password String?
bio String? bio String?
avatar String? avatar String?
timeZone String @default("Europe/London") timeZone String @default("Europe/London")
weekStart String? @default("Sunday") weekStart String @default("Sunday")
startTime Int @default(0) startTime Int @default(0)
endTime Int @default(1440) endTime Int @default(1440)
bufferTime Int @default(0) bufferTime Int @default(0)
@ -85,7 +91,7 @@ model User {
bookings Booking[] bookings Booking[]
availability Availability[] availability Availability[]
selectedCalendars SelectedCalendar[] selectedCalendars SelectedCalendar[]
completedOnboarding Boolean? @default(false) completedOnboarding Boolean @default(false)
locale String? locale String?
twoFactorSecret String? twoFactorSecret String?
twoFactorEnabled Boolean @default(false) twoFactorEnabled Boolean @default(false)