-- Create Table Statement for 'Terminal Order Transaction'
DROP TABLE IF EXISTS `TERMINAL_ORDER_TRANSACTION`;
CREATE TABLE `TERMINAL_ORDER_TRANSACTION` (
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	CREATE_DATE datetime,
	PROCESSED_DATE datetime,
	COMPLETED_DATE datetime,
	CANCELLED_DATE datetime,
	TERMINAL_ORDER_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	BATCH_FK bigint(20),
	TRACKING_NUMBER varchar,
	ORDER_STATUS_CL varchar,
	SHIPPING_DATE datetime,
	RESPONSE_MESSAGE varchar,
	PROVIDER_ORDER_CODE varchar,
	TPG_TERMINAL_ORDER_TRANSACTION_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	BATCH_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	BATCH_FK bigint(20),
	TERMINAL_ORDER_TRANSACTION_DETAILS bigint(20),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;