This commit is contained in:
dimitar 2025-03-24 05:22:13 +01:00
parent 30255ce3c2
commit b2f52a25c7
5 changed files with 1543 additions and 1935 deletions

3363
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,20 @@
{
"name": "mono",
"version": "1.0.0",
"description": "",
"author": "",
"private": true,
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"build": "turbo run build",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"check-types": "turbo run check-types"
"check-types": "turbo run check-types",
"clean": "turbo run clean"
},
"dependencies": {
"@nestjs/common": "^10.3.3",
@ -28,21 +36,30 @@
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.3",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.24",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.3",
"@types/node": "^20.5.1",
"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
"prettier": "^3.5.3",
"turbo": "^2.4.4",
"typescript": "5.8.2"
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"turbo": "^2.3.0",
"typescript": "^5.0.0"
},
"engines": {
"node": ">=18"
},
"packageManager": "npm@10.9.2",
"workspaces": [
"apps/*",
"packages/*"
]
"packageManager": "npm@10.9.2"
}

View File

@ -0,0 +1,42 @@
-- CreateTable
CREATE TABLE "Feed" (
"id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT NOT NULL,
"link" TEXT NOT NULL,
"imageUrl" TEXT,
"lastBuildDate" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Feed_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Item" (
"id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT NOT NULL,
"link" TEXT NOT NULL,
"pubDate" TEXT NOT NULL,
"guid" TEXT NOT NULL,
"categories" TEXT[],
"authors" TEXT[],
"feedId" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Item_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Feed_link_key" ON "Feed"("link");
-- CreateIndex
CREATE UNIQUE INDEX "Item_link_key" ON "Item"("link");
-- CreateIndex
CREATE UNIQUE INDEX "Item_guid_key" ON "Item"("guid");
-- AddForeignKey
ALTER TABLE "Item" ADD CONSTRAINT "Item_feedId_fkey" FOREIGN KEY ("feedId") REFERENCES "Feed"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -29,3 +29,31 @@ model Session {
@@map("sessions")
}
model Feed {
id Int @id @default(autoincrement())
title String
description String
link String @unique
imageUrl String?
lastBuildDate String
items Item[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Item {
id Int @id @default(autoincrement())
title String
description String
link String @unique
pubDate String
guid String @unique
categories String[]
authors String[]
feed Feed @relation(fields: [feedId], references: [id])
feedId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}

File diff suppressed because one or more lines are too long