// 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"
}

datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

model Stanza {
  id       String @id @default(cuid())
  text     String
  songId   String
  song     Song   @relation(fields: [songId], references: [id])
  register String
}

model Song {
  id       String   @id @default(cuid())
  name     String   @unique
  artistId String
  artist   Artist   @relation(fields: [artistId], references: [id])
  stanzas  Stanza[]
}

model Artist {
  id    String @id @default(cuid())
  name  String @unique
  songs Song[]
}
