wasp/examples/tutorials/TodoApp/schema.prisma
2024-07-03 13:51:29 +02:00

24 lines
563 B
Plaintext

datasource db {
provider = "sqlite"
// Wasp requires that the url is set to the DATABASE_URL environment variable.
url = env("DATABASE_URL")
}
// Wasp requires the `prisma-client-js` generator to be present.
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
tasks Task[]
}
model Task {
id Int @id @default(autoincrement())
description String
isDone Boolean @default(false)
user User? @relation(fields: [userId], references: [id])
userId Int?
}