CREATE TABLE `tbltenant_free_card_reader_autobill` (
	`id` BIGINT(20) unsigned NOT NULL AUTO_INCREMENT,
	`tenant_id` BIGINT(20) unsigned NOT NULL,
	`card_reader_order_id` BIGINT(20) unsigned NOT NULL,
	`amount` DECIMAL(15,2) NOT NULL,
	`payment_status` ENUM('failed','processing','completed','cancelled') NOT NULL,
	`cb_response` TEXT,
	`cb_invoice_id` VARCHAR(50),
	`cb_hostpage_id` VARCHAR(50),
	`last_checked_at` DATETIME DEFAULT NULL,
	`created_at` DATETIME NOT NULL,
	`updated_at` DATETIME NOT NULL,
	PRIMARY KEY (`id`)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

ALTER TABLE tbltenant_card_reader_orders 
ADD COLUMN `cb_hostpage_id` VARCHAR(255),
ADD COLUMN `cb_invoice_id` VARCHAR(50);