NeahFront7/prisma/schema.prisma
2025-04-14 00:36:39 +02:00

68 lines
1.6 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"
binaryTargets = ["native", "linux-arm64-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
datasource newsdb {
provider = "postgresql"
url = env("NEWSDB_URL")
}
model Calendar {
id String @id @default(uuid())
name String
color String @default("#0082c9")
description String?
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
events Event[]
@@index([userId])
}
model Event {
id String @id @default(uuid())
title String
description String?
start DateTime
end DateTime
location String?
isAllDay Boolean @default(false)
calendar Calendar @relation(fields: [calendarId], references: [id], onDelete: Cascade)
calendarId String
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([calendarId])
@@index([userId])
}
model News {
id Int @id @default(autoincrement())
title String
url String @unique
date DateTime
source String
content String?
sentiment_score Float?
sentiment String?
symbols String[]
symbol String?
processed_at DateTime @default(now())
description String?
category String? @db.VarChar(50)
@@index([category])
@@index([date])
@@index([symbol])
}