182 lines
3.4 KiB
Plaintext
182 lines
3.4 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
}
|
|
|
|
enum UserGender {
|
|
MALE
|
|
FEMALE
|
|
OTHER
|
|
}
|
|
|
|
enum Sentiment {
|
|
POSITIVE
|
|
NEGATIVE
|
|
NEUTRAL
|
|
}
|
|
|
|
enum OS {
|
|
WINDOWS
|
|
MACOS
|
|
LINUX
|
|
CHROME_OS
|
|
OTHER
|
|
}
|
|
|
|
enum Brand {
|
|
APPLE
|
|
ASUS
|
|
ACER
|
|
LENOVO
|
|
HP
|
|
DELL
|
|
MSI
|
|
AXIOO
|
|
ADVAN
|
|
ZYREX
|
|
OTHER
|
|
}
|
|
|
|
model Account {
|
|
id Int @id @default(autoincrement())
|
|
userId Int
|
|
type String
|
|
provider String
|
|
providerAccountId String
|
|
refresh_token String?
|
|
access_token String?
|
|
expires_at Int?
|
|
token_type String?
|
|
scope String?
|
|
id_token String?
|
|
session_state String?
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([provider, providerAccountId])
|
|
}
|
|
|
|
model Session {
|
|
id Int @id @default(autoincrement())
|
|
sessionToken String @unique
|
|
userId Int
|
|
expires DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model VerificationToken {
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
|
|
@@unique([identifier, token])
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
name String?
|
|
email String? @unique
|
|
emailVerified DateTime?
|
|
image String?
|
|
password String?
|
|
bio String? @db.Text
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
accounts Account[]
|
|
sessions Session[]
|
|
analyses Analysis[]
|
|
|
|
preference UserPreference?
|
|
}
|
|
|
|
model UserPreference {
|
|
id Int @id @default(autoincrement())
|
|
profession String?
|
|
preferredOS OS?
|
|
preferedBrand Brand?
|
|
budgetMin Int?
|
|
budgetMax Int?
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
userId Int @unique
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model Product {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
brand String?
|
|
url String @unique
|
|
image String?
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
reviews Review[]
|
|
analyses Analysis[]
|
|
}
|
|
|
|
model Review {
|
|
id Int @id @default(autoincrement())
|
|
content String
|
|
sentiment Sentiment
|
|
confidenceScore Float
|
|
keywords String[]
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
productId Int
|
|
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
|
|
|
modelId Int?
|
|
model Model? @relation(fields: [modelId], references: [id])
|
|
}
|
|
|
|
model Analysis {
|
|
id Int @id @default(autoincrement())
|
|
|
|
targetProfession String
|
|
|
|
generalSentiment Float
|
|
compatibilityScore Float
|
|
verdict String
|
|
|
|
topKeywords String[]
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
userId Int
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
productId Int
|
|
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
|
|
|
modelId Int
|
|
model Model @relation(fields: [modelId], references: [id])
|
|
}
|
|
|
|
model Model {
|
|
id Int @id @default(autoincrement())
|
|
modelName String
|
|
description String?
|
|
version String?
|
|
|
|
accuracy Float
|
|
macroF1 Float
|
|
f1Negative Float
|
|
f1Neutral Float
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
analyses Analysis[]
|
|
reviews Review[]
|
|
}
|