feat: astro test

This commit is contained in:
trafficlunar 2026-04-16 22:32:08 +01:00
parent df6e31ba89
commit 84144c383c
262 changed files with 18993 additions and 2655 deletions

View file

@ -0,0 +1,25 @@
-- CreateEnum
CREATE TYPE "ReportType" AS ENUM ('MII', 'USER');
-- CreateEnum
CREATE TYPE "ReportReason" AS ENUM ('INAPPROPRIATE', 'SPAM', 'COPYRIGHT', 'OTHER');
-- CreateEnum
CREATE TYPE "ReportStatus" AS ENUM ('OPEN', 'RESOLVED', 'DISMISSED');
-- CreateTable
CREATE TABLE "reports" (
"id" SERIAL NOT NULL,
"reportType" "ReportType" NOT NULL,
"status" "ReportStatus" NOT NULL DEFAULT 'OPEN',
"targetId" INTEGER NOT NULL,
"reason" "ReportReason" NOT NULL,
"reasonNotes" TEXT,
"authorId" INTEGER,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "reports_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "reports" ADD CONSTRAINT "reports_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;