-- Create Table Statement for 'User'
DROP TABLE IF EXISTS `IAPP_USER`;
CREATE TABLE `IAPP_USER` (
	CODE int(11) NOT NULL,
	REF_CODE varchar,
	CREATE_DATE datetime,
	IS_ACTIVE tinyint(1),
	USER_NAME varchar,
	PASSWORD varchar,
	ROLE varchar,
	NAME varchar,
	EMAIL varchar,
	PHONE varchar,
	CUSTOMER_ACCOUNT_CODE varchar,
	IS_AGENT_COMMISSION_ALLOWED tinyint(1),
	DEFAULT_MERCHANT_CODE int(11),
	DEFAULT_MERCHANT_ACCOUNT_CODE int(11),
	PASSWORD_PREVIOUS varchar,
	PASSWORD_EXPIRATION_DATE datetime,
	USER_ROLE_FK bigint(20),
	TITLE varchar,
	DEPARTMENT varchar,
	EVENING_PHONE varchar,
	CELL_PHONE varchar,
	SECURITY_QUESTION varchar,
	SECURITY_ANSWER varchar,
	SECURITY_LEVEL int(11),
	NOTES varchar,
	LICENSE_AGREEMENT_ACCEPTANCE_DATE datetime,
	IP_ADDRESS_ACCESS_LIST varchar,
	COUNTRY_CODE_ACCESS_LIST varchar,
	IP_ADDRESS_ACCESS_POLICY_CL varchar,
	COUNTRY_CODE_ACCESS_POLICY_CL varchar,
	TIME_ZONE_CODE varchar,
	STREET1 varchar,
	STREET2 varchar,
	CITY varchar,
	STATE varchar,
	ZIP_CODE varchar,
	COUNTRY_CODE varchar,
	FAX varchar,
	FAILED_LOGIN_COUNT int(11),
	FUNCTION_POLICY varchar,
	PORTFOLIOS_FK int(11),
	GROUP_FK int(11),
	DEACTIVATION_REASON_CL varchar,
	TIME_ZONE_SYSTEM_CODE varchar,
	PERMISSION_MASK varchar,
	ROLE_CODE varchar,
	LAST_LOGON_DATE datetime,
	SECURITY_IMAGE varchar,
	OWNER_CODE int(11),
	OWNER_CL varchar,
	SECRET_KEY varchar,
	PRIVILEGES int(11),
	ADDITIONAL_PASSWORD varchar,
	PASSWORD_NEXT varchar,
	PASSWORD_NEXT_CREATE_DATE datetime,
	ADDITIONAL_PASSWORD_NEXT varchar,
	RESELLERS_FK int(11),
	MERCHANTS_FK int(11),
	RAW_ACCOUNT_DATA_MODE_CL varchar,
	RAW_ACCOUNT_DATA_MODE_CL varchar,
	RAW_ACCOUNT_DATA_MODE_CL varchar,
	RAW_ACCOUNT_DATA_MODE_CL varchar,
	AUTHENTICATION_CL varchar,
	SETTINGS_CONTENT varchar,
	SETTINGS_CONTENT varchar,
	AUTHENTICATION_CL varchar,
	RESPONSE_MESSAGE_DISPLAY_POLICY varchar,
	RESPONSE_MESSAGE_DISPLAY_POLICY varchar,
	USER_STATUS_CL varchar,
	USER_STATUS_CL varchar,
	OWNER_CL varchar NOT NULL,
	OWNER_CL varchar NOT NULL,
	USER_STATUS_CL varchar,
	SETTINGS_CONTENT varchar,
	AUTHENTICATION_CL varchar,
	RESPONSE_MESSAGE_DISPLAY_POLICY varchar,
	IS_ACTIVE tinyint(1),
	IS_ACTIVE tinyint(1),
	IS_ACTIVE tinyint(1),
	IS_ACTIVE tinyint(1),
	USER_STATUS_CL varchar,
	USER_STATUS_CL varchar,
	USER_NAME varchar,
	USER_NAME varchar,
	IS_ACTIVE tinyint(1),
	EMAIL varchar,
	IS_ACTIVE tinyint(1),
	NAME varchar,
	FAX varchar,
	USER_NAME varchar,
	PASSWORD varchar,
	PASSWORD_PREVIOUS varchar,
	NAME varchar,
	EMAIL varchar,
	PHONE varchar,
	CUSTOMER_ACCOUNT_CODE varchar,
	DEPARTMENT varchar,
	EVENING_PHONE varchar,
	CELL_PHONE varchar,
	FAX varchar,
	SECURITY_QUESTION varchar,
	SECURITY_ANSWER varchar,
	SECURITY_LEVEL int(11),
	NOTES varchar,
	IP_ADDRESS_ACCESS_LIST varchar,
	COUNTRY_CODE_ACCESS_LIST varchar,
	TIME_ZONE_CODE varchar,
	STREET1 varchar,
	STREET2 varchar,
	CITY varchar,
	ZIP_CODE varchar,
	COUNTRY_CODE varchar,
	FUNCTION_POLICY varchar,
	ROLE_CODE varchar,
	OWNER_CL varchar,
	STATE varchar,
	USER_NAME varchar,
	PASSWORD varchar,
	PASSWORD_PREVIOUS varchar,
	NAME varchar,
	EMAIL varchar,
	PHONE varchar,
	CUSTOMER_ACCOUNT_CODE varchar,
	DEPARTMENT varchar,
	EVENING_PHONE varchar,
	CELL_PHONE varchar,
	FAX varchar,
	SECURITY_QUESTION varchar,
	SECURITY_ANSWER varchar,
	SECURITY_LEVEL int(11),
	NOTES varchar,
	IP_ADDRESS_ACCESS_LIST varchar,
	COUNTRY_CODE_ACCESS_LIST varchar,
	TIME_ZONE_CODE varchar,
	STREET1 varchar,
	STREET2 varchar,
	CITY varchar,
	ZIP_CODE varchar,
	COUNTRY_CODE varchar,
	FUNCTION_POLICY varchar,
	ROLE_CODE varchar,
	OWNER_CL varchar,
	STATE varchar,
	TITLE varchar,
	DEPARTMENT varchar,
	CELL_PHONE varchar,
	EVENING_PHONE varchar,
	FAX varchar,
	EMAIL varchar,
	PASSWORD_PREVIOUS varchar,
	PASSWORD_EXPIRATION_DATE datetime,
	FAILED_LOGIN_COUNT int(11),
	FUNCTION_POLICY varchar,
	USER_ROLE_FK bigint(20),
	SETTINGS_CONTENT varchar,
	GROUP_FK int(11),
	TITLE varchar,
	DEPARTMENT varchar,
	CELL_PHONE varchar,
	EVENING_PHONE varchar,
	FAX varchar,
	EMAIL varchar,
	PASSWORD_PREVIOUS varchar,
	PASSWORD_EXPIRATION_DATE datetime,
	FAILED_LOGIN_COUNT int(11),
	FUNCTION_POLICY varchar,
	USER_ROLE_FK bigint(20),
	SETTINGS_CONTENT varchar,
	GROUP_FK int(11),
	PHONE varchar,
	EVENING_PHONE varchar,
	CELL_PHONE varchar,
	PHONE varchar,
	EVENING_PHONE varchar,
	CELL_PHONE varchar,
	PRIMARY KEY (CODE)
) ENGINE=InnoDB;