55 lines
1.0 KiB
Plaintext
55 lines
1.0 KiB
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"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
username String @unique
|
|
password String
|
|
email String
|
|
LessonHistory LessonHistory[]
|
|
}
|
|
|
|
model Lesson {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
description String
|
|
requiredLevel Int
|
|
mainSkill Skill
|
|
LessonHistory LessonHistory[]
|
|
}
|
|
|
|
model LessonHistory {
|
|
lesson Lesson @relation(fields: [lessonID], references: [id])
|
|
lessonID Int
|
|
user User @relation(fields: [userID], references: [id])
|
|
userID Int
|
|
|
|
@@id([lessonID, userID])
|
|
}
|
|
|
|
enum Skill {
|
|
TwoHands
|
|
Rhythm
|
|
NoteCombo
|
|
Arpeggio
|
|
Distance
|
|
LeftHand
|
|
RightHand
|
|
LeadHandChange
|
|
ChordComplexity
|
|
ChordTiming
|
|
Length
|
|
PedalPoint
|
|
Precision
|
|
|
|
@@map("DifficultyPoint")
|
|
}
|