Extended "Link" model.

This commit is contained in:
Daniel 2023-03-06 23:38:11 +03:30
parent cff10fa9b6
commit bd3b2f50f2
2 changed files with 10 additions and 0 deletions

View File

@ -36,7 +36,12 @@ CREATE TABLE "Link" (
"id" SERIAL NOT NULL, "id" SERIAL NOT NULL,
"name" TEXT NOT NULL, "name" TEXT NOT NULL,
"url" TEXT NOT NULL, "url" TEXT NOT NULL,
"title" TEXT NOT NULL,
"collectionId" INTEGER NOT NULL, "collectionId" INTEGER NOT NULL,
"isFavorites" BOOLEAN NOT NULL,
"screenshotPath" TEXT NOT NULL,
"pdfPath" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Link_pkey" PRIMARY KEY ("id") CONSTRAINT "Link_pkey" PRIMARY KEY ("id")
); );

View File

@ -47,9 +47,14 @@ model Link {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
name String name String
url String url String
title String
collection Collection @relation(fields: [collectionId], references: [id]) collection Collection @relation(fields: [collectionId], references: [id])
collectionId Int collectionId Int
tags Tag[] tags Tag[]
isFavorites Boolean
screenshotPath String
pdfPath String
createdAt DateTime @default(now())
} }
model Tag { model Tag {