feat: add LinkResult, Pagination, and StatsCards components; implement server actions for link management and global stats retrieval

This commit is contained in:
Puechberty Arthur
2026-03-30 19:28:58 +02:00
parent 4ede5021b1
commit f95587fc7a
46 changed files with 4224 additions and 177 deletions
@@ -0,0 +1,22 @@
-- CreateTable
CREATE TABLE "Link" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"originalUrl" TEXT NOT NULL,
"shortCode" TEXT NOT NULL,
"clickCount" INTEGER NOT NULL DEFAULT 0,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"title" TEXT,
"favicon" TEXT
);
-- CreateIndex
CREATE UNIQUE INDEX "Link_shortCode_key" ON "Link"("shortCode");
-- CreateIndex
CREATE INDEX "Link_shortCode_idx" ON "Link"("shortCode");
-- CreateIndex
CREATE INDEX "Link_createdAt_idx" ON "Link"("createdAt");
-- CreateIndex
CREATE INDEX "Link_clickCount_idx" ON "Link"("clickCount");