-- Create Table Statement for 'Generic Email'
DROP TABLE IF EXISTS `GENERIC_EMAIL`;
CREATE TABLE `GENERIC_EMAIL` (
	ID bigint(20) NOT NULL,
	TO_EMAIL varchar,
	SUBJECT varchar,
	MESSAGE varchar,
	ATTACHMENT_CODE bigint(20),
	FILE_EXTENTION varchar,
	SEND_DATE datetime,
	MESSAGE_ID varchar,
	RESPONSE varchar,
	SUBMISSION_CODE bigint(20),
	EXTERNAL_REFERENCE_CODE bigint(20),
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	EMAIL_TRANSACTION_FK bigint(20),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	GENERIC_EMAIL_FILE_BATCH_FK bigint(20),
	ATTACHMENT_CONTENT_SOURCE_CL varchar,
	FROM_EMAIL varchar,
	CC_EMAIL varchar,
	IS_PLAIN_MESSAGE tinyint(1),
	BCC_EMAIL varchar,
	MESSAGE varchar,
	MESSAGE varchar,
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	REPLY_TO_EMAIL varchar,
	REPLY_TO_EMAIL varchar,
	REPLY_TO_EMAIL varchar,
	PRIMARY KEY (ID)
) ENGINE=InnoDB;