lora-studio / prisma /schema.prisma
enzostvs's picture
enzostvs HF staff
refacto models + community
eb29a95
raw
history blame
987 Bytes
// 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"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model Model {
id String @id
createdAt DateTime @default(now())
title String
image String
likes Int?
downloads Int?
isPublic Boolean @default(false)
hf_user_id String?
Gallery Gallery[]
}
model Gallery {
id String @id @default(uuid())
hf_user_id String?
createdAt DateTime @default(now())
prompt String
image String
reactions Reaction[]
model Model @relation(fields: [modelId], references: [id])
modelId String
}
model Reaction {
id String @id @default(uuid())
createdAt DateTime @default(now())
emoji String
hf_user_id String
Gallery Gallery? @relation(fields: [galleryId], references: [id])
galleryId String?
}