-- Create Table Statement for 'Merchant Statement Extended'
DROP TABLE IF EXISTS `MERCHANT_STATEMENT_EXTENDED`;
CREATE TABLE `MERCHANT_STATEMENT_EXTENDED` (
	CREATE_DATE datetime,
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	REMITTED_AMOUNT bigint(20),
	START_DATE datetime,
	END_DATE datetime,
	PROVIDER_STATEMENT_ID varchar,
	PROVIDER_MERCHANT_ID varchar,
	PROFILE_NAME varchar,
	CONTENT_FK bigint(20),
	DEPOSIT_CL varchar,
	STATEMENT_CL varchar,
	ACCOUNT_TYPE varchar,
	DEPOSIT_TYPE varchar,
	SOURCE_CL varchar,
	SOURCE_CL varchar,
	DEPOSIT_CL varchar,
	DEPOSIT_CL varchar,
	STATEMENT_CODE bigint(20),
	PAYMENT_CARD_SUBMISSIONS_AMOUNT bigint(20),
	PAYMENT_CARD_DECLINES_AMOUNT bigint(20),
	PAYMENT_CARD_VOIDS_AMOUNT bigint(20),
	PAYMENT_CARD_CHARGEBACKS_AMOUNT bigint(20),
	PAYMENT_CARD_BLACKLISTS_AMOUNT bigint(20),
	PAYMENT_CARD_ERRORS_AMOUNT bigint(20),
	PAYMENT_CARD_REVERSALS_AMOUNT bigint(20),
	PAYMENT_CARD_NET_AMOUNT bigint(20),
	DIRECT_DEBIT_SUBMITTED_AMOUNT bigint(20),
	DIRECT_DEBIT_DECLINES_AMOUNT bigint(20),
	DIRECT_DEBIT_VOIDS_AMOUNT bigint(20),
	DIRECT_DEBIT_RETURNS_AMOUNT bigint(20),
	DIRECT_DEBIT_BLACKLISTS_AMOUNT bigint(20),
	DIRECT_DEBIT_ERRORS_AMOUNT bigint(20),
	DIRECT_DEBIT_NET_AMOUNT bigint(20),
	TOTAL_COLLECTED_AMOUNT bigint(20),
	SURCHARGE_FEE_AMOUNT bigint(20),
	RESERVES_DIRECT_DEBIT_NET_SALES_AMOUNT bigint(20),
	RESERVES_PAYMENT_CARD_NET_SALES_AMOUNT bigint(20),
	RESERVES_RETURNS_RATE decimal(10,2),
	RESERVES_RETURNS_MIN_AMOUNT bigint(20),
	RESERVES_RETURNS_REQUIRED_BALANCE bigint(20),
	RESERVES_RETURNS_PREVIOUS_BALANCE bigint(20),
	RESERVES_RETURNS_COLLECTED_AMOUNT bigint(20),
	RESERVES_RETURNS_CURRENT_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_RATE decimal(10,2),
	RESERVES_CHARGEBACKS_MIN_AMOUNT bigint(20),
	RESERVES_CHARGEBACKS_REQUIRED_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_PREVIOUS_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_COLLECTED_AMOUNT bigint(20),
	RESERVES_CHARGEBACKS_CURRENT_BALANCE bigint(20),
	RESERVES_REFUNDS_MAX_AMOUNT bigint(20),
	RESERVES_REFUNDS_PREVIOUS_BALANCE bigint(20),
	RESERVES_REFUNDS_COLLECTED_AMOUNT bigint(20),
	RESERVES_REFUNDS_CURRENT_BALANCE bigint(20),
	SPLIT_INS_AMOUNT bigint(20),
	SPLIT_OUTS_AMOUNT bigint(20),
	PULL_INS_AMOUNT bigint(20),
	PULL_OUTS_AMOUNT bigint(20),
	TAX_AMOUNT bigint(20),
	CHARGES_AMOUNT bigint(20),
	ADJUSTMENTS_AMOUNT bigint(20),
	PROCESSING_COST_AMOUNT bigint(20),
	DEPOSIT_DATE datetime,
	CAPTURE_CURRENCY_CODE varchar,
	BANK_ACCOUNT_NUMBER_MASKED varchar,
	BANK_ROUTING_NUMBER_MASKED varchar,
	CAPTURE_CURRENCY_CODE varchar,
	CREATE_DATE datetime,
	IS_STATEMENT_EMPTY tinyint(1),
	SOURCE_CL varchar,
	STATEMENT_CODE bigint(20),
	PAYMENT_CARD_SUBMISSIONS_AMOUNT bigint(20),
	PAYMENT_CARD_DECLINES_AMOUNT bigint(20),
	PAYMENT_CARD_VOIDS_AMOUNT bigint(20),
	PAYMENT_CARD_CHARGEBACKS_AMOUNT bigint(20),
	PAYMENT_CARD_BLACKLISTS_AMOUNT bigint(20),
	PAYMENT_CARD_ERRORS_AMOUNT bigint(20),
	PAYMENT_CARD_REVERSALS_AMOUNT bigint(20),
	PAYMENT_CARD_NET_AMOUNT bigint(20),
	DIRECT_DEBIT_SUBMITTED_AMOUNT bigint(20),
	DIRECT_DEBIT_DECLINES_AMOUNT bigint(20),
	DIRECT_DEBIT_VOIDS_AMOUNT bigint(20),
	DIRECT_DEBIT_RETURNS_AMOUNT bigint(20),
	DIRECT_DEBIT_BLACKLISTS_AMOUNT bigint(20),
	DIRECT_DEBIT_ERRORS_AMOUNT bigint(20),
	DIRECT_DEBIT_NET_AMOUNT bigint(20),
	TOTAL_COLLECTED_AMOUNT bigint(20),
	SURCHARGE_FEE_AMOUNT bigint(20),
	RESERVES_DIRECT_DEBIT_NET_SALES_AMOUNT bigint(20),
	RESERVES_PAYMENT_CARD_NET_SALES_AMOUNT bigint(20),
	RESERVES_RETURNS_RATE decimal(10,2),
	RESERVES_RETURNS_MIN_AMOUNT bigint(20),
	RESERVES_RETURNS_REQUIRED_BALANCE bigint(20),
	RESERVES_RETURNS_PREVIOUS_BALANCE bigint(20),
	RESERVES_RETURNS_COLLECTED_AMOUNT bigint(20),
	RESERVES_RETURNS_CURRENT_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_RATE decimal(10,2),
	RESERVES_CHARGEBACKS_MIN_AMOUNT bigint(20),
	RESERVES_CHARGEBACKS_REQUIRED_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_PREVIOUS_BALANCE bigint(20),
	RESERVES_CHARGEBACKS_COLLECTED_AMOUNT bigint(20),
	RESERVES_CHARGEBACKS_CURRENT_BALANCE bigint(20),
	RESERVES_REFUNDS_MAX_AMOUNT bigint(20),
	RESERVES_REFUNDS_PREVIOUS_BALANCE bigint(20),
	RESERVES_REFUNDS_COLLECTED_AMOUNT bigint(20),
	RESERVES_REFUNDS_CURRENT_BALANCE bigint(20),
	SPLIT_INS_AMOUNT bigint(20),
	SPLIT_OUTS_AMOUNT bigint(20),
	PULL_INS_AMOUNT bigint(20),
	PULL_OUTS_AMOUNT bigint(20),
	TAX_AMOUNT bigint(20),
	CHARGES_AMOUNT bigint(20),
	ADJUSTMENTS_AMOUNT bigint(20),
	PROCESSING_COST_AMOUNT bigint(20),
	DEPOSIT_DATE datetime,
	CAPTURE_CURRENCY_CODE varchar,
	BANK_ACCOUNT_NUMBER_MASKED varchar,
	BANK_ROUTING_NUMBER_MASKED varchar,
	IS_STATEMENT_EMPTY tinyint(1),
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	REMITTED_AMOUNT bigint(20),
	ACCOUNT_TYPE varchar,
	IS_IGNORE_REMITTANCE_SOURCE tinyint(1),
	RECONCILIATION_STATEMENT_FK bigint(20),
	SPITS_DIRECT_DEBIT_NET_AMOUNT bigint(20),
	SPITS_PAYMENT_CARD_NET_AMOUNT bigint(20),
	IS_STATEMENT_EMPTY tinyint(1),
	IS_IGNORE_REMITTANCE_SOURCE tinyint(1),
	RECONCILIATION_STATEMENT_FK bigint(20),
	SPITS_DIRECT_DEBIT_NET_AMOUNT bigint(20),
	SPITS_PAYMENT_CARD_NET_AMOUNT bigint(20),
	GROSS_AMOUNT bigint(20),
	BATCH_DEPOSIT_POLICY varchar,
	REALTIME_DEPOSIT_POLICY varchar,
	BATCH_DEPOSIT_POLICY varchar,
	REALTIME_DEPOSIT_POLICY varchar,
	GROSS_AMOUNT bigint(20),
	IS_VISIBLE tinyint(1),
	IS_VISIBLE tinyint(1),
	BATCH_DEPOSIT_POLICY varchar,
	REALTIME_DEPOSIT_POLICY varchar,
	GROSS_AMOUNT bigint(20),
	IS_VISIBLE tinyint(1),
	STATUS_CL varchar,
	STATUS_CL varchar,
	STATUS_CL varchar,
	FUNDING_MODE_CL varchar,
	FUNDING_MODE_CL varchar,
	FUNDING_MODE_CL varchar,
	REMITTED_AMOUNT bigint(20),
	REMITTED_AMOUNT bigint(20),
	REMITTED_AMOUNT bigint(20),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;