CREATE TABLE "FishingProfile" (
    "userId" TEXT NOT NULL,
    "guildId" TEXT NOT NULL,
    "totalCastCount" INTEGER NOT NULL DEFAULT 0,
    "successCount" INTEGER NOT NULL DEFAULT 0,
    "failCount" INTEGER NOT NULL DEFAULT 0,
    "totalGoldEarned" INTEGER NOT NULL DEFAULT 0,
    "bestCatchReward" INTEGER NOT NULL DEFAULT 0,
    "commonCatchCount" INTEGER NOT NULL DEFAULT 0,
    "uncommonCatchCount" INTEGER NOT NULL DEFAULT 0,
    "rareCatchCount" INTEGER NOT NULL DEFAULT 0,
    "epicCatchCount" INTEGER NOT NULL DEFAULT 0,
    "legendaryCatchCount" INTEGER NOT NULL DEFAULT 0,
    "lastCastAt" TIMESTAMP(3),
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "FishingProfile_pkey" PRIMARY KEY ("userId","guildId")
);

CREATE INDEX "FishingProfile_guildId_successCount_idx" ON "FishingProfile"("guildId", "successCount" DESC);
