CREATE TABLE `coupons` (
	`id` int AUTO_INCREMENT NOT NULL,
	`code` varchar(50) NOT NULL,
	`discount_type` enum('percentage','fixed') NOT NULL,
	`discount_value` int NOT NULL,
	`is_active` int NOT NULL DEFAULT 1,
	`usage_limit` int,
	`used_count` int NOT NULL DEFAULT 0,
	`created_at` timestamp NOT NULL DEFAULT (now()),
	`expires_at` timestamp,
	CONSTRAINT `coupons_id` PRIMARY KEY(`id`),
	CONSTRAINT `coupons_code_unique` UNIQUE(`code`)
);
--> statement-breakpoint
ALTER TABLE `requests` ADD `smsVerificationCode` varchar(6);--> statement-breakpoint
ALTER TABLE `requests` ADD `smsVerified` int DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE `requests` ADD `couponCode` varchar(50);--> statement-breakpoint
ALTER TABLE `requests` ADD `discountAmount` int DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE `requests` ADD `finalPrice` int DEFAULT 180 NOT NULL;