34 lines
777 B
Plaintext
34 lines
777 B
Plaintext
datasource db {
|
|
provider = "sqlite"
|
|
url = "file:./dev.db"
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model Plan {
|
|
id String @id @default(cuid())
|
|
title String
|
|
password String
|
|
startDate DateTime
|
|
endDate DateTime
|
|
instructions String?
|
|
webhookUrl String?
|
|
notifyAll Boolean @default(true)
|
|
createdAt DateTime @default(now())
|
|
bookings Booking[]
|
|
}
|
|
|
|
model Booking {
|
|
id Int @id @default(autoincrement())
|
|
planId String
|
|
plan Plan @relation(fields: [planId], references: [id])
|
|
date DateTime
|
|
sitterName String?
|
|
type String @default("SITTER") // "SITTER" or "OWNER_HOME"
|
|
createdAt DateTime @default(now())
|
|
|
|
@@unique([planId, date, sitterName])
|
|
}
|