feat: base pages and news fetching with cron job

This commit is contained in:
Riccardo
2023-11-25 09:20:38 +01:00
parent aa34263bdf
commit 74ec709155
31 changed files with 10641 additions and 123 deletions

30
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,30 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}
model User {
id String @default(cuid()) @id
email String? @unique
targetingAllowed Boolean @default(false)
createdAt DateTime @default(now()) @map(name: "created_at")
@@map(name: "users")
}
model News {
id Float @unique @id
title String
text String?
type String
by String
time Float
url String?
score Float
createdAt DateTime @default(now()) @map(name: "created_at")
@@map(name: "news")
}