-- CreateTable
CREATE TABLE "resource" (
    "id" TEXT NOT NULL,
    "title" TEXT,
    "description" TEXT,
    "type" TEXT,
    "fileId" TEXT,
    "url" TEXT,
    "meta" JSONB,
    "status" TEXT,
    "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3),
    "created_by" TEXT,
    "updated_by" TEXT,
    "deleted_at" TIMESTAMP(3),
    "is_public" BOOLEAN DEFAULT true,

    CONSTRAINT "resource_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "resource_fileId_key" ON "resource"("fileId");

-- CreateIndex
CREATE INDEX "resource_type_idx" ON "resource"("type");

-- CreateIndex
CREATE INDEX "resource_created_at_idx" ON "resource"("created_at");
