// 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" previewFeatures = ["interactiveTransactions"] } datasource db { provider = "sqlite" url = env("DATABASE_URL") } model EncryptedNote { id String @id @default(cuid()) insert_time DateTime @default(now()) expire_time DateTime @default(now()) ciphertext String hmac String crypto_version String @default("v1") EncryptedEmbed EncryptedEmbed[] } model EncryptedEmbed { id String @id @default(cuid()) note_id String embed_id String ciphertext Bytes hmac String size_bytes Int note EncryptedNote @relation(fields: [note_id], references: [id]) @@unique([note_id, embed_id], name: "noteId_embedId") } model event { id Int @id @default(autoincrement()) time DateTime @default(now()) type String success Boolean size_bytes Int? note_id String? host String? error String? expire_window_days Int? user_id String? user_plugin_version String? } model BloomFilter { name String @id serializedFilter Bytes }