33 lines
853 B
Plaintext
33 lines
853 B
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
output = "../src/generated/client"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Collection {
|
|
id String @id @default(uuid())
|
|
name String
|
|
drawings Drawing[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model Drawing {
|
|
id String @id @default(uuid())
|
|
name String
|
|
elements String // Stored as JSON string
|
|
appState String // Stored as JSON string
|
|
version Int @default(1)
|
|
collectionId String?
|
|
collection Collection? @relation(fields: [collectionId], references: [id])
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|