CREATE table `tblpayoutrecords` ( 
    id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, 
    tenant_id bigint(20) NOT NULL, 
    source_payout_id varchar(255) NOT NULL, 
    source_merchant_id varchar(255) NOT NULL,
    merchant_name varchar(255) DEFAULT NULL,  
    currency varchar(20) DEFAULT NULL, 
    fee_amount decimal(15,2) DEFAULT NULL, 
    net_amount decimal(15,2) DEFAULT NULL, 
    gross_amount decimal(15,2) DEFAULT NULL, 
    status tinyint(4) DEFAULT NULL COMMENT '1 = completed | 2 = pending | 3 = failed', 
    created_at datetime DEFAULT NULL, 
    completed_at datetime DEFAULT NULL,
    updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)

INSERT INTO `tblmobile_push_notification_config` (`id`, `codename`, `is_active`) VALUES (NULL, 'payout_pending_generated', '1'), (NULL, 'payout_completed_generated', '1'), (NULL, 'payout_failed_generated', '1');

ALTER TABLE `tblpayoutrecords` ADD `status_message` TEXT NULL DEFAULT NULL AFTER `status`; 