-- AlterTable
ALTER TABLE `Transaction` MODIFY `type` ENUM('DEPOSIT', 'WITHDRAWAL', 'PREDICTION', 'INSTANT_PLAY', 'PAYOUT', 'ADJUSTMENT', 'REFERRAL_BONUS', 'REFUND') NOT NULL;

-- CreateTable
CREATE TABLE `InstantGame` (
    `id` VARCHAR(191) NOT NULL,
    `userId` VARCHAR(191) NOT NULL,
    `choice` INTEGER NOT NULL,
    `amount` DECIMAL(18, 2) NOT NULL,
    `odds` DECIMAL(10, 2) NOT NULL,
    `dice1` INTEGER NOT NULL,
    `dice2` INTEGER NOT NULL,
    `result` INTEGER NOT NULL,
    `payout` DECIMAL(18, 2) NOT NULL,
    `status` ENUM('WON', 'LOST') NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),

    INDEX `InstantGame_userId_idx`(`userId`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `InstantGame` ADD CONSTRAINT `InstantGame_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
