Files
admin.fellies.app/prisma/schema.prisma
2025-06-25 12:52:10 +02:00

82 lines
1.8 KiB
Plaintext

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
output = "../src/generated/prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Gallery {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String
slug String @unique
description String?
// coverImageId String?
// coverImage Image? @relation("GalleryCoverImage", fields: [coverImageId], references: [id])
albums Album[]
}
model Album {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String
slug String
description String?
// coverImageId String?
galleryId String?
// coverImage Image? @relation("AlbumCoverImage", fields: [coverImageId], references: [id])
gallery Gallery? @relation(fields: [galleryId], references: [id])
// images Image[]
}
model Artist {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
displayName String
slug String @unique
nickname String?
// mentionUrl String?
// contact String?
// urls String[]
socials Social[]
// images Image[]
}
model Social {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
handle String?
url String?
type String?
icon String?
artistId String?
artist Artist? @relation(fields: [artistId], references: [id])
}