CREATE TABLE IF NOT EXISTS payouts (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
out_trade_no VARCHAR(80) NOT NULL,
account VARCHAR(30) NOT NULL,
user_name VARCHAR(100) NOT NULL,
amount DECIMAL(15,2) NOT NULL DEFAULT 0.00,
currency VARCHAR(10) NOT NULL DEFAULT 'BDT',
pay_type VARCHAR(30) NOT NULL DEFAULT 'NAGAD',
status VARCHAR(30) NOT NULL DEFAULT 'PROCESSING',
transaction_id VARCHAR(150) DEFAULT NULL,
api_response LONGTEXT NULL,
callback_response LONGTEXT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY(id),UNIQUE KEY uq_out_trade_no(out_trade_no),KEY idx_status(status),KEY idx_account(account)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;