-- Create Table Statement for 'Sub Batch'
DROP TABLE IF EXISTS `SUB_BATCH`;
CREATE TABLE `SUB_BATCH` (
	ID bigint(20) NOT NULL,
	TOTAL_COUNT int(11),
	TOTAL_AMOUNT bigint(20),
	STATUS varchar,
	PROVIDER_CODE bigint(20),
	OPERATION_CL varchar,
	REVIEW_CL varchar,
	HAS_DECLINE_TRANSACTIONS tinyint(1),
	ATTEMPT_DATE datetime,
	RETRY_COUNT int(11),
	REMAINING_RETRY_COUNT int(11),
	PROCESSED_DATE datetime,
	SUB_BATCH_CL varchar,
	SUB_BATCH_TYPE varchar,
	APPROVER_CODE varchar,
	SUB_BATCH_CONTENT_CL varchar,
	IS_RESPONSE_SUPPRESSED tinyint(1),
	IS_LOCKED tinyint(1),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	DUPLICATE_SUB_BATCH_CODE bigint(20),
	HOLD_SUB_BATCH_FK bigint(20),
	TERMINAL_ORDER_TRANSACTION_FK bigint(20),
	FILE_BATCH_FK bigint(20),
	ACCOUNT_UPDATE_SUBSCRIPTION_TRANSACTIONS_FK bigint(20),
	BATCH_FK bigint(20),
	SUBSCRIPTION_TRANSACTIONS_FK bigint(20),
	AGGREGATE_SUB_BATCH_FK bigint(20),
	CHARGE_TRANSACTIONS_FK bigint(20),
	COLLECTIONS_TRANSACTIONS_FK bigint(20),
	EMAIL_TRANSACTION_FK bigint(20),
	CREDIT_AGENCY_TRANSACTIONS_FK bigint(20),
	ACCOUNT_UPDATE_TRANSACTIONS_FK bigint(20),
	SKIP_TRACING_TRANSACTIONS_FK bigint(20),
	CHARGEBACK_CASE_ACTIVITIES_FK bigint(20),
	CHARGEBACK_CASE_DOCUMENTS_FK bigint(20),
	APPROVAL_DATE datetime,
	ACCOUNT_UPDATE_BATCH_FK bigint(20),
	EXTERNAL_CODE int(11),
	EXTERNAL_CODE int(11),
	DUPLICATE_SUB_BATCH_CODE bigint(20),
	EXTERNAL_CODE int(11),
	DUPLICATE_SUB_BATCH_CODE bigint(20),
	EXTERNAL_CODE bigint(20),
	DUPLICATE_SUB_BATCH_CODE bigint(20),
	ACCOUNT_UPDATE_BATCH_FK bigint(20),
	ACCOUNT_UPDATE_BATCH_FK bigint(20),
	ATTEMPT_DATE datetime,
	BATCH_FK bigint(20),
	STATUS varchar,
	PROVIDER_CODE bigint(20),
	REVIEW_CL varchar,
	OPERATION_CL varchar,
	RETRY_COUNT int(11),
	TOTAL_COUNT int(11),
	TOTAL_AMOUNT bigint(20),
	APPROVER_CODE varchar,
	APPROVAL_DATE datetime,
	ATTEMPT_DATE datetime,
	BATCH_FK bigint(20),
	STATUS varchar,
	PROVIDER_CODE bigint(20),
	REVIEW_CL varchar,
	OPERATION_CL varchar,
	RETRY_COUNT int(11),
	TOTAL_COUNT int(11),
	TOTAL_AMOUNT bigint(20),
	APPROVER_CODE varchar,
	APPROVAL_DATE datetime,
	BATCH_STATUS varchar,
	BATCH_STATUS varchar,
	BATCH_STATUS varchar,
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;