Initial commit of working RSS Aggregator build
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
model User {
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
passwordHash String
|
||||
isAdmin Boolean @default(false)
|
||||
emailVerifiedAt DateTime?
|
||||
feeds Feed[]
|
||||
tags Tag[]
|
||||
entryState UserEntryState[]
|
||||
}
|
||||
|
||||
model Feed {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
url String
|
||||
lastFetchedAt DateTime?
|
||||
entries Entry[]
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
}
|
||||
|
||||
model Entry {
|
||||
id String @id @default(uuid())
|
||||
feedId String
|
||||
guid String
|
||||
title String
|
||||
link String
|
||||
content String?
|
||||
published DateTime?
|
||||
feed Feed @relation(fields: [feedId], references: [id])
|
||||
tags EntryTag[]
|
||||
state UserEntryState[]
|
||||
}
|
||||
|
||||
model Tag {
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
entries EntryTag[]
|
||||
}
|
||||
|
||||
model EntryTag {
|
||||
id String @id @default(uuid())
|
||||
entryId String
|
||||
tagId String
|
||||
userId String
|
||||
entry Entry @relation(fields: [entryId], references: [id])
|
||||
tag Tag @relation(fields: [tagId], references: [id])
|
||||
}
|
||||
|
||||
model UserEntryState {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
entryId String
|
||||
hidden Boolean @default(false)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
entry Entry @relation(fields: [entryId], references: [id])
|
||||
}
|
||||
Reference in New Issue
Block a user