-- CreateTable
CREATE TABLE "manual_mining_records" (
    "id" TEXT NOT NULL,
    "account_sequence" TEXT NOT NULL,
    "adoption_date" DATE NOT NULL,
    "effective_date" DATE NOT NULL,
    "execute_date" TIMESTAMP(3) NOT NULL,
    "total_seconds" BIGINT NOT NULL,
    "user_contribution" DECIMAL(30,8) NOT NULL,
    "network_contribution" DECIMAL(30,8) NOT NULL,
    "second_distribution" DECIMAL(30,18) NOT NULL,
    "contribution_ratio" DECIMAL(30,18) NOT NULL,
    "amount" DECIMAL(30,8) NOT NULL,
    "operator_id" TEXT NOT NULL,
    "operator_name" TEXT NOT NULL,
    "reason" TEXT NOT NULL,
    "wallet_synced" BOOLEAN NOT NULL DEFAULT false,
    "wallet_synced_at" TIMESTAMP(3),
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateIndex
CREATE UNIQUE INDEX "manual_mining_records_account_sequence_key" ON "manual_mining_records"("account_sequence");

-- CreateIndex
CREATE INDEX "manual_mining_records_operator_id_idx" ON "manual_mining_records"("operator_id");

-- CreateIndex
CREATE INDEX "manual_mining_records_wallet_synced_idx" ON "manual_mining_records"("wallet_synced");

-- CreateIndex
CREATE INDEX "manual_mining_records_created_at_idx" ON "manual_mining_records"("created_at" DESC);
