CREATE TABLE `cashapp_payments` (
	`id` int AUTO_INCREMENT NOT NULL,
	`userId` int NOT NULL,
	`packageId` int NOT NULL,
	`amount` decimal(10,2) NOT NULL,
	`cashtag` varchar(100) NOT NULL,
	`status` enum('pending','verified','completed','failed','cancelled') NOT NULL DEFAULT 'pending',
	`verifiedAt` timestamp,
	`verifiedBy` int,
	`completedAt` timestamp,
	`failureReason` text,
	`createdAt` timestamp NOT NULL DEFAULT (now()),
	`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
	CONSTRAINT `cashapp_payments_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE INDEX `idx_cashapp_payments_userId` ON `cashapp_payments` (`userId`);--> statement-breakpoint
CREATE INDEX `idx_cashapp_payments_status` ON `cashapp_payments` (`status`);--> statement-breakpoint
CREATE INDEX `idx_cashapp_payments_createdAt` ON `cashapp_payments` (`createdAt`);