CREATE TABLE `media` (
	`id` text PRIMARY KEY NOT NULL,
	`object_key` text NOT NULL,
	`filename` text NOT NULL,
	`content_type` text NOT NULL,
	`sort_order` integer DEFAULT 0 NOT NULL,
	`created_at` text NOT NULL
);
--> statement-breakpoint
CREATE TABLE `settings` (
	`id` integer PRIMARY KEY NOT NULL,
	`price` real DEFAULT 2000 NOT NULL,
	`redirect_url` text DEFAULT 'https://example.com' NOT NULL,
	`popup_title` text DEFAULT 'Lipia ili kuendelea' NOT NULL,
	`popup_description` text DEFAULT 'Weka namba yako ya simu yenye pesa. Utapokea ombi la kuthibitisha malipo.' NOT NULL,
	`updated_at` text NOT NULL
);
--> statement-breakpoint
CREATE TABLE `transactions` (
	`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
	`order_id` text NOT NULL,
	`phone` text NOT NULL,
	`amount` real NOT NULL,
	`currency` text DEFAULT 'TZS' NOT NULL,
	`status` text DEFAULT 'PENDING' NOT NULL,
	`channel` text,
	`reference` text,
	`transid` text,
	`created_at` text NOT NULL,
	`updated_at` text NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `transactions_order_id_unique` ON `transactions` (`order_id`);