-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.1.44-community


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


--
-- Create schema medsysmagic
--

CREATE DATABASE IF NOT EXISTS medsysmagic;
USE medsysmagic;

--
-- Definition of table `countries`
--

DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
  `country_id` double DEFAULT NULL,
  `country` varchar(768) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `countries`
--

/*!40000 ALTER TABLE `countries` DISABLE KEYS */;
/*!40000 ALTER TABLE `countries` ENABLE KEYS */;


--
-- Definition of table `ec_apps_messages`
--

DROP TABLE IF EXISTS `ec_apps_messages`;
CREATE TABLE `ec_apps_messages` (
  `apps_msg_id` int(11) NOT NULL AUTO_INCREMENT,
  `msg_code` varchar(5) CHARACTER SET utf8 NOT NULL,
  `app_code` varchar(5) CHARACTER SET utf8 NOT NULL,
  `language_id` int(11) DEFAULT NULL,
  `msg_text` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
  `msg_desc` varchar(4000) CHARACTER SET utf8 DEFAULT NULL,
  `msg_sev` int(11) DEFAULT NULL,
  PRIMARY KEY (`apps_msg_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_apps_messages`
--

/*!40000 ALTER TABLE `ec_apps_messages` DISABLE KEYS */;
INSERT INTO `ec_apps_messages` (`apps_msg_id`,`msg_code`,`app_code`,`language_id`,`msg_text`,`msg_desc`,`msg_sev`) VALUES 
 (1,'00001','MCH',1,'Doctor record(s) has been created',NULL,0),
 (2,'00002','MCH',1,'Doctor record(s) has been created',NULL,0),
 (3,'00004','MCH',1,'Doctor record(s) has been updated',NULL,0),
 (4,'00003','MCH',1,'Doctor record(s) has been deleted',NULL,0);
/*!40000 ALTER TABLE `ec_apps_messages` ENABLE KEYS */;


--
-- Definition of table `ec_apps_tables`
--

DROP TABLE IF EXISTS `ec_apps_tables`;
CREATE TABLE `ec_apps_tables` (
  `apps_table_id` int(11) NOT NULL AUTO_INCREMENT,
  `table_name` varchar(30) DEFAULT NULL,
  `apps_code` varchar(5) DEFAULT NULL,
  `language_id` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`apps_table_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_apps_tables`
--

/*!40000 ALTER TABLE `ec_apps_tables` DISABLE KEYS */;
INSERT INTO `ec_apps_tables` (`apps_table_id`,`table_name`,`apps_code`,`language_id`,`is_active`) VALUES 
 (1,'mc_company_facility','MCH',1,1),
 (2,'mc_company_questions','MCH',1,1),
 (3,'mc_customer_dependent','MCH',1,1),
 (4,'mc_customer_history','MCH',1,1),
 (5,'mc_customer_history_detail','MCH',1,1),
 (6,'mc_customer_treatment','MCH',1,1),
 (7,'mc_customer_treatment_detail','MCH',1,1),
 (8,'mc_customers','MCH',1,1),
 (9,'mc_days','MCH',1,1),
 (10,'mc_facility','MCH',1,1),
 (11,'mc_facility_holiday_calendar','MCH',1,1),
 (12,'mc_facility_timing','MCH',1,1),
 (13,'mc_facility_treatment','MCH',1,1),
 (14,'mc_holiday_calendar_detail','MCH',1,1),
 (15,'mc_holidays_calendar','MCH',1,1),
 (16,'mc_prod_treatment','MCH',1,1),
 (17,'mc_question_category','MCH',1,1),
 (18,'mc_questions','MCH',1,1),
 (19,'mc_relationship','MCH',1,1),
 (20,'mc_scheduler','MCH',1,1),
 (21,'mc_specialist','MCH',1,1),
 (22,'mc_specialist_facility','MCH',1,1),
 (23,'mc_specialist_timing','MCH',1,1),
 (24,'mc_specialist_treatment','MCH',1,1),
 (25,'mc_treatment','MCH',1,1);
/*!40000 ALTER TABLE `ec_apps_tables` ENABLE KEYS */;


--
-- Definition of table `ec_apps_tables_description`
--

DROP TABLE IF EXISTS `ec_apps_tables_description`;
CREATE TABLE `ec_apps_tables_description` (
  `apps_table_desc_id` int(11) NOT NULL,
  `apps_table_id` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `column_name` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
  `column_text` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `column_hint` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `data_type` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `attribute_type` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `data_length` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
  `is_display` int(1) DEFAULT NULL,
  `is_required` int(1) DEFAULT NULL,
  `is_multi_value` int(1) DEFAULT NULL,
  `object_to_call` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `multi_value_attribute` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `attribute_mask` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `is_searchable` int(11) DEFAULT NULL,
  `search_seq` int(11) DEFAULT NULL,
  `css_id` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
  `css_class` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`apps_table_desc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_apps_tables_description`
--

/*!40000 ALTER TABLE `ec_apps_tables_description` DISABLE KEYS */;
INSERT INTO `ec_apps_tables_description` (`apps_table_desc_id`,`apps_table_id`,`display_seq`,`column_name`,`column_text`,`column_hint`,`data_type`,`attribute_type`,`data_length`,`is_display`,`is_required`,`is_multi_value`,`object_to_call`,`multi_value_attribute`,`attribute_mask`,`is_searchable`,`search_seq`,`css_id`,`css_class`,`is_active`) VALUES 
 (1,1,1,'COMPANY_FACILITY_ID','Company Facility Id','Enter Company Facility Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (2,1,2,'FACILITY_ID','Facility Id','Enter Facility Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (3,1,3,'COMPANY_CODE','Company Code','Enter Company Code','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (4,1,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (5,1,5,'IS_DEFAULT','Is Default','Enter Is Default','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (6,1,6,'IS_ACTIVE','Is Active','Enter Is Active','int','int','11',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (7,1,7,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (8,1,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (9,1,9,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (10,1,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (11,2,1,'COMPANY_QUESTION_ID','Company Question Id','Enter Company Question Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (12,2,2,'COMPANY_CODE','Company Code','Enter Company Code','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (13,2,3,'MC_QUESTION_ID','Mc Question Id','Enter Mc Question Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (14,2,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (15,2,5,'CONDITION_ALERT','Condition Alert','Enter Condition Alert','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (16,2,6,'IS_ACTIVE','Is Active','Enter Is Active','int','int','11',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (17,2,7,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (18,2,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (19,2,9,'LAST_UPDATED_DATE','Last Dated Date','Enter Last Dated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (20,2,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (21,3,1,'CUSTOMER_DEPENDENT_ID','Customer Dependent Id','Enter Customer Dependent Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (22,3,2,'CUSTOMER_ID','Customer Id','Enter Customer Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (23,3,3,'DISPALY_SEQ','Dispaly Seq','Enter Dispaly Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (24,3,4,'PRIMARY_CUST_ID','Primary Cust Id','Enter Primary Customer Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (25,3,5,'RELATIONSHIP_ID','Relationship Id','Enter Relationship Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (26,3,6,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (27,3,7,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (28,3,8,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (29,3,9,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (30,4,1,'CUST_HIST_ID','Customer History Id','Enter Customer History Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (31,4,2,'COMPANY_CODE','Company Code','Enter Company Code','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (32,4,3,'FACILITY_ID','Facility Id','Enter Facility Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (33,4,4,'CUSTOMER_ID','Customer Id','Enter Customer Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (34,4,5,'HIST_REC_DATE','History Record Date','Enter History Record Date','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (35,4,6,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (36,4,7,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (37,4,8,'LAST_DATED_DATE','Last Dated Date','Enter Last Dated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (38,4,9,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (39,5,1,'CUST_HIST_DETAIL_ID','Customer History Detail Id','Enter Customer History Detail Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (40,5,2,'CUST_HIST_ID','Customer History Id','Enter Customer History Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (41,5,3,'MC_QUESTION_ID','Mc Question Id','Enter Mc Question Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (42,5,4,'CUST_ANSWER','Customer Answer','Enter Customer Answer','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (43,5,5,'CUST_COMMENTS','Customer Comments','Enter Customer Comments','text','textarea','4000',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (44,5,6,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (45,5,7,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (46,5,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (47,5,9,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (48,5,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (49,6,1,'CUSTOMER_TREATMENT_ID','Customer Treatment Id','Enter Customer Treatment Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (50,6,2,'SPECIALIST_ID','Specialist Id','Enter Specialist Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (51,6,3,'TREATMENT_DATE','Treatment Date','Enter Treatment Date','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (52,6,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (53,6,5,'COMMENTS','Comments','Enter Comments','text','textarea','4000',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (54,6,6,'IS_ACTIVE','Is Active','Enter Is Active','int','int','11',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (55,6,7,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (56,6,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (57,6,9,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (58,6,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (59,7,1,'CUSTOMER_TREATMENT_DETAIL_ID','Customer Treatment Detail Id','Enter Customer Treatment Detail Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (60,7,2,'CUSTOMER_TREATMENT_ID','Customer Treatment Id','Enter Customer Treatment Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (61,7,3,'TREATMENT_ID','Treatment Id','Enter Treatment Id','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (62,7,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (63,7,5,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (64,7,6,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (65,7,7,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (66,7,8,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (67,9,1,'DAY_ID','Day Id','Enter Day Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (68,9,2,'DAY_DISPLAY_NAME','Day Display Name','Enter Day Display Name','string','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (69,9,3,'DAY_ENG_NAME','Day English Name','Enter Day English Name','string','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (70,9,4,'DISPALY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (71,9,5,'IS_ACTIVE','Is Active','Enter Is Active','int','int','11',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (72,9,6,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (73,9,7,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (74,9,8,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (75,9,9,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (76,10,1,'FACILITY_ID','Facility Id','Enter Facility Id','int','hidden','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (77,10,2,'COMPANY_CODE','Company Code','Enter Company Code','int','hidden','100',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (78,10,2,'DISPLAY_SEQ','Display Sequence','Enter Display Seq','int','hidden','100',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (79,10,2,'FACILITY_NAME','Facility Name','Enter Facility Name','string','text','100',1,0,0,NULL,NULL,NULL,1,1,NULL,NULL,1),
 (80,10,3,'ADDRESS_LINE1','Address Line1','Enter Address Line1','string','text','100',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (81,10,4,'ADDRESS_LINE2','Address Line2','Enter Address Line2','string','text','100',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (82,10,5,'CITY','City','Enter City','string','text','50',1,0,0,NULL,NULL,NULL,1,2,NULL,NULL,1),
 (83,10,6,'STATE','State','Enter State','string','text','20',1,0,0,NULL,NULL,NULL,1,3,NULL,NULL,1),
 (84,10,7,'PHONE01','Phone01','Enter Phone01','string','text','20',1,0,0,NULL,NULL,NULL,1,4,NULL,NULL,1),
 (85,10,8,'PHONE02','Phone02','Enter Phone02','string','text','20',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (86,10,9,'EMAIL_ADDRESS','Email Address','Enter Email Address','string','text','100',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (87,10,10,'WEB_LINK','Web Link','Enter Web Link','string','text','50',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (88,10,11,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'mc_is_active_value',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (89,10,12,'CREATED_DATE','Created Date','Enter Created Date','date','hidden','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'datepicker',1),
 (90,10,13,'CREATED_BY','Created By','Enter Created By','int','hidden','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (91,10,14,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','hidden','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'datepicker',1),
 (92,10,15,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','hidden','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (93,12,1,'FACILITY_TIME_ID','Facility Time Id','Enter Facility Time Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (94,12,2,'FACILITY_ID','Facility Id','Enter Facility Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (95,12,3,'DAY_ID','Day Id','Enter Day Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (96,12,4,'TIME_FORM','Time Form','Enter Time Form','string','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (97,12,5,'TIME_TO','Time To','Enter Time To','string','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (98,12,6,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (99,12,7,'VALID_FROM','Valid From','Enter Valid From','date','date','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'datepicker',1),
 (100,12,8,'VALID_TO','Valid To','Enter Valid To','date','date','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'datepicker',1),
 (101,12,9,'COMMENTS','Comments','Enter Comments','string','textarea','200',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (102,12,10,'IS_ACTIVE','Is Active','Enter Is Active','int','int','1',1,0,1,'mc_is_active_value',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (103,12,11,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (104,12,12,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (105,12,13,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (106,12,14,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (107,13,1,'FACILITY_TREATMENT_ID','Facility Treatment Id','Enter Facility Treatment Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (108,13,2,'FACILITY_ID','Facility Id','Enter Facility Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (109,13,3,'TREATMENT_ID','Treatment Id','Enter Treatment Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (110,13,4,'IS_ACTIVE','Is Active','Enter Is Active','int','int','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (111,13,5,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (112,13,6,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (113,13,7,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (114,13,8,'LAST_UPDATED_BY','Last Updated By','Enter Last Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (115,14,1,'CALENDAR_DETAIL_ID','Calendar Detail Id','Enter Calendar Detail Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (116,14,2,'CALENDAR_ID','Calendar Id','Enter Calendar Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (117,14,3,'CALENDAR_DATE','Calendar Date','Enter Calendar Date','date','date','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (118,14,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (119,14,5,'IS_ACTIVE','Is Active','Enter Is Active','int','int','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (120,14,6,'CREATED_DATE','Created By','Enter Created By','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (121,14,7,'CREATED_BY','Created Date','Enter Created Date','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (122,14,8,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (123,14,9,'LAST_UPDATED_BY','Last Updated By','Enter Last Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (124,15,1,'CALENDAR_ID','Calendar Id','Enter Calendar Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (125,15,2,'CALENDAR_NAME','Calendar Name','Enter Calendar Name','int','string','50',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (126,15,3,'IS_ACTIVE','Is Active','Enter Is Active','int','int','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (127,15,4,'CREATED_DATE','Created Date','Enter Created Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (128,15,5,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (129,15,6,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (130,15,7,'LAST_UPDATED_BY','Last Updated By','Enter Last Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (131,17,1,'QUESTION_CATEGORY_ID','Question Category Id','Enter Question Category Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (132,17,2,'QUESTION_CATEGORY_NAME','Question Category Name','Enter Question Category Name','string','string','50',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (133,17,3,'QUESTION_CATEGORY_DESC','Question Category Desc','Enter Question Category Description','string','string','4000',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (134,17,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (135,17,5,'PARENT_CATEGORY_ID','Parent Category Id','Enter Parent Category Id','int','list','11',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (136,17,6,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (137,17,7,'CREATED_DATE','Created Date','Enter Created Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (138,17,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (139,17,9,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','date','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (140,17,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (141,18,1,'MC_QUESTION_ID','Mc Question Id','Enter Mc Question Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (142,18,2,'QUESTION_CATEGORY_ID','Question Category Id','Enter Question Category Id','int','list','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (143,18,3,'QUESTION_NUM','Question Num','Enter Question Num','string','string','5',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (144,18,4,'QUESTION_DESC','Question Desc','Enter Question Desc','string','string','400',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (145,18,5,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (146,18,6,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (147,18,7,'CREATED_DATE','Created Date','Enter Created Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (148,18,8,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (149,18,9,'LAST_DATED_DATE','Last Dated Date','Enter Last Dated Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (150,18,10,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (151,19,1,'RELATIONSHIP_ID','Relationship Id','Enter Relationship Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (152,19,2,'RELATIONSHIP_NAME','Relationship Name','Enter Relationship Name','int','string','40',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (153,19,3,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (154,19,4,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (155,19,5,'CREATED_DATE','Created Date','Enter Created Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (156,19,6,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (157,19,7,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (158,19,8,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (159,21,1,'SPECIALIST_ID','Specialist Id','Enter Specialist Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (160,21,2,'FIRST_NAME','First Name','Enter First Name','int','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (161,21,3,'MIDDLE_NAME','Middle Name','Enter Middle Name','int','string','20',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (162,21,4,'LAST_NAME','Last Name','Enter Last Name','int','string','20',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (163,21,5,'TITLE','Title','Enter Title','int','string','50',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (164,21,6,'DEGREE_LINE1','Degree Line1','Enter Degree Line1','int','string','100',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (165,21,7,'DEGREE_LINE2','Degree Line2','Enter Degree Line2','int','string','100',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (166,21,8,'OFFICE_PHONE','Office Phone','Enter Office Phone','int','string','20',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (167,21,9,'HOME_PHONE','Home Phone','Enter Home Phone','int','string','20',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (168,21,10,'CELL_PHONE','Cell Phone','Enter Cell Phone','int','string','20',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (169,21,11,'EMAIL_ADDRESS','Email Address','Enter Email Address','int','string','100',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (170,21,12,'SPECIALIST_PICTURE_PATH','Specialist Picture Path','Enter Specialist Picture Path','int','string','200',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (171,21,13,'IS_PICTURE_DISPLAY','Is Picture Display','Enter Is Picture Display','int','int','1',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (172,21,14,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (173,21,15,'ADMIN_COMMENTS','Admin Comments','Enter Admin Comments','int','textarea','400',1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (174,21,16,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (175,21,17,'CREATED_DATE','Created Date','Enter Created Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (176,21,18,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (177,21,19,'LAST_UPDATE_DATE','Last Update Date','Enter Last Update Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (178,21,20,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (179,22,1,'SPECLIALIST_FACILITY_ID','Specialist Facility Id','Enter Specialist Facility Id','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (180,22,2,'SPECIALIST_ID','Specialist Id','Enter Specialist Id','int','list','11',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (181,22,3,'FACILITY_ID','Facility Id','Enter Facility Id','int','list','11',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (182,22,4,'DISPLAY_SEQ','Display Seq','Enter Display Seq','int','int','11',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (183,22,5,'IS_ACTIVE','Is Active','Enter Is Active','int','list','1',1,0,1,'sp_l_getListvalue($v_company_code,\'mc_is_active_value\')',NULL,NULL,NULL,NULL,NULL,NULL,1),
 (184,22,6,'CREATED_DATE','Created Date','Enter Created Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (185,22,7,'CREATED_BY','Created By','Enter Created By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (186,22,8,'LAST_UPDATED_DATE','Last Updated Date','Enter Last Updated Date','int','date','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),
 (187,22,9,'LAST_UPDATED_BY','Updated By','Enter Updated By','int','int','11',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `ec_apps_tables_description` ENABLE KEYS */;


--
-- Definition of table `ec_attribute_category`
--

DROP TABLE IF EXISTS `ec_attribute_category`;
CREATE TABLE `ec_attribute_category` (
  `attribute_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `attribute_category_desc` varchar(100) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`attribute_category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_attribute_category`
--

/*!40000 ALTER TABLE `ec_attribute_category` DISABLE KEYS */;
INSERT INTO `ec_attribute_category` (`attribute_category_id`,`attribute_category_desc`,`display_seq`,`is_active`) VALUES 
 (1,'Administration Attribute',1,1),
 (2,'Decoration',2,1),
 (3,'Business Parameter Setup',3,1),
 (4,'Web Features',4,1),
 (5,'Color Selection',5,1),
 (6,'Catelog Setup',6,1),
 (7,'Borders',7,1),
 (8,'Menu Options',8,1),
 (20,'Others',20,1);
/*!40000 ALTER TABLE `ec_attribute_category` ENABLE KEYS */;


--
-- Definition of table `ec_attribute_values`
--

DROP TABLE IF EXISTS `ec_attribute_values`;
CREATE TABLE `ec_attribute_values` (
  `attribute_value_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) DEFAULT NULL,
  `attribute_id` int(11) DEFAULT NULL,
  `attribute_value_desc` tinytext,
  `attribute_value` varchar(200) DEFAULT NULL,
  `top_padding` int(11) DEFAULT NULL,
  `left_padding` int(11) DEFAULT NULL,
  `attribute_height` int(11) DEFAULT NULL,
  `attribute_width` int(11) DEFAULT NULL,
  `attribute_style` varchar(20) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`attribute_value_id`),
  KEY `fk_ec_attr_val_comp_attr_id` (`company_code`,`attribute_id`)
) ENGINE=MyISAM AUTO_INCREMENT=199 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_attribute_values`
--

/*!40000 ALTER TABLE `ec_attribute_values` DISABLE KEYS */;
INSERT INTO `ec_attribute_values` (`attribute_value_id`,`company_code`,`attribute_id`,`attribute_value_desc`,`attribute_value`,`top_padding`,`left_padding`,`attribute_height`,`attribute_width`,`attribute_style`,`display_seq`,`is_active`) VALUES 
 (1,1,1,NULL,'asset/image_bank/others/',10,15,10,30,'no repeat',1,1),
 (2,1,2,NULL,'asset/image_bank/others/',10,20,10,30,'no repeat',2,1),
 (3,1,3,NULL,'asset/image_bank/others/favicon.ico',10,25,10,30,'no repeat',3,1),
 (4,1,4,NULL,'asset/image_bank/others/',10,30,10,30,'no repeat',4,1),
 (5,1,5,NULL,'asset/company/',10,35,10,30,'no repeat',5,1),
 (6,1,6,NULL,'asset/product/',10,40,10,30,'no repeat',6,1),
 (7,1,7,NULL,'asset/offer/',10,45,10,30,'no repeat',7,1),
 (8,1,8,NULL,'asset/image_bank/banner/',10,50,10,30,'no repeat',8,1),
 (9,1,9,NULL,'asset/image_bank/others/',10,55,10,30,'no repeat',9,1),
 (10,1,10,NULL,'asset/js/',10,60,10,30,'no repeat',10,1),
 (11,1,11,NULL,'asset/xml/',10,65,10,30,'no repeat',11,1),
 (12,1,12,NULL,'asset/css/',10,70,10,30,'no repeat',12,1),
 (13,1,13,NULL,'asset/video/',10,75,10,30,'no repeat',13,1),
 (14,1,14,NULL,'asset/video/',10,80,10,30,'no repeat',14,1),
 (15,1,15,NULL,'asset/image_bank/others/',10,85,10,30,'no repeat',15,1),
 (16,1,16,NULL,'asset/image_bank/others/',10,90,10,30,'no repeat',16,1),
 (17,1,17,NULL,'asset/image_bank/others/',10,95,10,30,'no repeat',17,1),
 (18,1,18,NULL,'Login',10,100,10,30,'no repeat',18,1),
 (19,1,19,NULL,'asset/image_bank/others/',10,105,10,30,'no repeat',19,1),
 (20,1,20,NULL,'Register User',10,110,10,30,'no repeat',20,1),
 (21,1,21,NULL,'asset/image_bank/others/',10,115,10,30,'no repeat',21,1),
 (22,1,22,NULL,'Apply Coupon',10,120,10,30,'no repeat',22,1),
 (23,1,23,NULL,'asset/image_bank/others/',10,125,10,30,'no repeat',23,1),
 (24,1,24,NULL,'Apply Giftcard',10,130,10,30,'no repeat',24,1),
 (25,1,25,NULL,'asset/image_bank/others/',10,135,10,30,'no repeat',25,1),
 (26,1,26,NULL,'My Orders',10,140,10,30,'no repeat',26,1),
 (27,1,27,NULL,'asset/image_bank/others/',10,145,10,30,'no repeat',27,1),
 (28,1,28,NULL,'No Photo Available',10,150,10,30,'no repeat',28,1),
 (29,1,29,NULL,'0',10,155,10,30,'no repeat',29,1),
 (30,1,30,NULL,'asset/image_bank/others/',10,160,10,30,'no repeat',30,1),
 (31,1,31,NULL,'Product is not avaiable currently, Please try lattar..',10,165,10,30,'no repeat',31,1),
 (32,1,32,NULL,'Free Shipping on over $25',10,170,10,30,'no repeat',32,1),
 (33,1,33,NULL,'$25',10,175,10,30,'no repeat',33,1),
 (34,1,34,NULL,'Privercy Policy',10,180,10,30,'no repeat',34,1),
 (35,1,35,NULL,'Client Privercy Policy Message will be here .',10,185,10,30,'no repeat',35,1),
 (36,1,36,NULL,'Our Return Policy',10,190,10,30,'no repeat',36,1),
 (37,1,37,NULL,'Clinet Return Policy will be here',10,195,10,30,'no repeat',37,1),
 (38,1,38,NULL,'asset/image_bank/others/adminheader.jpg',10,200,10,30,'no repeat',38,1),
 (39,1,39,NULL,'asset/image_bank/others/adminfooter.jpg',10,205,10,30,'no repeat',39,1),
 (40,1,40,NULL,'asset/image_bank/audio/',10,210,10,30,'no repeat',40,1),
 (41,1,41,NULL,'Once, loop',10,215,10,30,'no repeat',41,1),
 (42,1,42,NULL,'',10,220,10,30,'no repeat',42,1),
 (43,1,43,NULL,'SALWAN-',10,225,10,30,'no repeat',43,1),
 (44,1,44,NULL,'asset/image_bank/others/more.jpg',10,230,10,30,'no repeat',1,1),
 (45,1,45,NULL,'asset/image_bank/others/prod_top.jpg',10,235,10,30,'no repeat',2,1),
 (46,1,46,NULL,'asset/image_bank/others/prod_bott.jpg',10,240,10,30,'no repeat',3,1),
 (47,1,47,NULL,'asset/image_bank/others/page_break.jpg',10,245,10,30,'no repeat',4,1),
 (48,1,48,NULL,'asset/image_bank/others/addrec.jpg',10,250,10,30,'no repeat',5,1),
 (49,1,49,NULL,'Add Record',10,255,10,30,'no repeat',6,1),
 (50,1,50,NULL,'asset/image_bank/others/editrec.jpg',10,260,10,30,'no repeat',7,1),
 (51,1,51,NULL,'Edit Record',10,265,10,30,'no repeat',8,1),
 (52,1,52,NULL,'asset/image_bank/others/delrec.jpg',10,270,10,30,'no repeat',9,1),
 (53,1,53,NULL,'Delete Record',10,275,10,30,'no repeat',10,1),
 (54,1,54,NULL,'asset/image_bank/others/saverec.jpg',10,280,10,30,'no repeat',11,1),
 (55,1,55,NULL,'Save Record',10,285,10,30,'no repeat',12,1),
 (56,1,56,NULL,'asset/image_bank/others/brows.jpg',10,290,10,30,'no repeat',13,1),
 (57,1,57,NULL,'Browse Folder',10,295,10,30,'no repeat',14,1),
 (58,1,58,NULL,'asset/image_bank/others/calender.jpg',10,300,10,30,'no repeat',15,1),
 (59,1,59,NULL,'Calender',10,305,10,30,'no repeat',16,1),
 (60,1,60,NULL,'asset/image_bank/others/calculator.jpg',10,310,10,30,'no repeat',17,1),
 (61,1,61,NULL,'Calculator',10,315,10,30,'no repeat',18,1),
 (62,1,62,NULL,'asset/image_bank/others/search.jpg',10,320,10,30,'no repeat',19,1),
 (63,1,63,NULL,'Search',10,325,10,30,'no repeat',20,1),
 (64,1,64,NULL,'asset/image_bank/others/viewcart.jpg',10,330,10,30,'no repeat',21,1),
 (65,1,65,NULL,'View Cart',10,335,10,30,'no repeat',22,1),
 (66,1,66,NULL,'asset/image_bank/others/addtochat.jpg',10,340,10,30,'no repeat',23,1),
 (67,1,67,NULL,'Add to Cart',10,345,10,30,'no repeat',24,1),
 (68,1,68,NULL,'asset/image_bank/others/checkout.jpg',10,350,10,30,'no repeat',25,1),
 (69,1,69,NULL,'Checkout',10,355,10,30,'no repeat',26,1),
 (70,1,70,NULL,'asset/image_bank/others/shopping.jpg',10,360,10,30,'no repeat',27,1),
 (71,1,71,NULL,'Continue Shopping',10,365,10,30,'no repeat',28,1),
 (72,1,72,NULL,'asset/image_bank/others/inquery.jpg',10,370,10,30,'no repeat',29,1),
 (73,1,73,NULL,'Submit Inquiry',10,375,10,30,'no repeat',30,1),
 (74,1,74,NULL,'asset/image_bank/others/next.jpg',10,380,10,30,'no repeat',31,1),
 (75,1,75,NULL,'Next',10,385,10,30,'no repeat',32,1),
 (76,1,76,NULL,'asset/image_bank/others/prev.jpg',10,390,10,30,'no repeat',33,1),
 (77,1,77,NULL,'Previous',10,395,10,30,'no repeat',34,1),
 (78,1,78,NULL,'asset/image_bank/others/up.jpg',10,400,10,30,'no repeat',35,1),
 (79,1,79,NULL,'Up',10,405,10,30,'no repeat',36,1),
 (80,1,80,NULL,'asset/image_bank/others/down.jpg',10,410,10,30,'no repeat',37,1),
 (81,1,81,NULL,'Down',10,415,10,30,'no repeat',38,1),
 (82,1,82,NULL,'asset/image_bank/others/help.jpg',10,420,10,30,'no repeat',39,1),
 (83,1,83,NULL,'Need Help?',10,425,10,30,'no repeat',40,1),
 (84,1,84,NULL,'asset/image_bank/others/background.jpg',10,430,10,30,'no repeat',41,1),
 (85,1,85,NULL,'no repeat, repeat',10,435,10,30,'no repeat',42,1),
 (86,1,86,NULL,'#e74bbb',10,440,10,30,'no repeat',43,1),
 (87,1,87,NULL,'#c58c8c',10,445,10,30,'no repeat',44,1),
 (88,1,88,NULL,'asset/image_bank/others/body_background.jpg',10,450,10,30,'no repeat',45,1),
 (89,1,89,NULL,'#123456',10,455,10,30,'no repeat',46,1),
 (90,1,90,NULL,'#e83b5a',10,460,10,30,'no repeat',47,1),
 (91,1,91,NULL,'#e83b4e',10,465,10,30,'no repeat',48,1),
 (92,1,92,NULL,'asset/image_bank/others/cat_bg.jpg',10,470,10,30,'no repeat',49,1),
 (93,1,93,NULL,'asset/image_bank/others/cat_bg2.jpg',10,475,10,30,'no repeat',50,1),
 (94,1,94,NULL,'asset/image_bank/others/',10,480,10,30,'no repeat',51,1),
 (95,1,95,NULL,'asset/image_bank/others/header_border.jpg',10,485,10,30,'no repeat',52,1),
 (96,1,96,NULL,'asset/image_bank/others/footer_boder.jpg',10,490,10,30,'no repeat',53,1),
 (97,1,97,NULL,'asset/image_bank/others/left.jpg',10,495,10,30,'no repeat',54,1),
 (98,1,98,NULL,'asset/image_bank/others/right.jpg',10,500,10,30,'no repeat',55,1),
 (99,1,99,NULL,'asset/image_bank/others/search_bg.jpg',10,505,10,30,'no repeat',56,1),
 (100,1,100,NULL,'asset/image_bank/others/',10,510,10,30,'no repeat',57,1),
 (101,1,101,NULL,'Special Offers!',10,515,10,30,'no repeat',58,1),
 (102,1,102,NULL,'asset/image_bank/others/right_top.jpg',10,520,10,30,'no repeat',59,1),
 (103,1,103,NULL,'asset/image_bank/others/right_bg.jpg',10,525,10,30,'no repeat',60,1),
 (104,1,104,NULL,'Category',10,530,10,30,'no repeat',61,1),
 (105,1,105,NULL,'asset/image_bank/others/left_top.jpg',10,535,10,30,'no repeat',62,1),
 (106,1,106,NULL,'asset/image_bank/others/left_bg.jpg',10,540,10,30,'no repeat',63,1),
 (107,1,107,NULL,'asset/image_bank/others/homecol1.jpg',10,545,10,30,'no repeat',64,1),
 (108,1,108,NULL,'asset/image_bank/others/homecol2.jpg',10,550,10,30,'no repeat',65,1),
 (109,1,109,NULL,'asset/image_bank/others/homecol3.jpg',10,555,10,30,'no repeat',66,1),
 (110,1,110,NULL,'asset/image_bank/others/homecol4.jpg',10,560,10,30,'no repeat',67,1),
 (111,1,111,NULL,'Welcome to the website',10,565,10,30,'no repeat',1,1),
 (112,1,112,NULL,'1',10,570,10,30,'no repeat',2,1),
 (113,1,113,NULL,'145',10,575,10,30,'no repeat',3,1),
 (114,1,114,NULL,'SAL-INV-',10,580,10,30,'no repeat',4,1),
 (115,1,115,NULL,'HomeRight',10,585,10,30,'no repeat',5,1),
 (116,1,116,NULL,'Category',10,590,10,30,'no repeat',6,1),
 (117,1,117,NULL,'Sub-Category',10,595,10,30,'no repeat',7,1),
 (118,1,118,NULL,'Left',10,600,10,30,'no repeat',8,1),
 (119,1,119,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',1,1),
 (120,1,120,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',2,1),
 (121,1,121,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',3,1),
 (122,1,122,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',4,1),
 (123,1,123,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',5,1),
 (124,1,124,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',6,1),
 (125,1,125,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',7,1),
 (126,1,126,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',8,1),
 (127,1,127,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',9,1),
 (128,1,128,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',10,1),
 (129,1,129,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',11,1),
 (130,1,130,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',12,1),
 (131,1,131,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',13,1),
 (132,1,132,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',14,1),
 (133,1,133,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',15,1),
 (134,1,134,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',16,1),
 (135,1,135,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',17,1),
 (136,1,136,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',18,1),
 (137,1,137,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',19,1),
 (138,1,138,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',20,1),
 (139,1,139,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',21,1),
 (140,1,140,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',22,1),
 (141,1,141,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',1,1),
 (142,1,142,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',2,1),
 (143,1,143,NULL,'1',NULL,NULL,NULL,NULL,'no repeat',3,1),
 (144,1,144,NULL,'1',NULL,NULL,NULL,NULL,'fade',4,1),
 (145,1,145,'Right Side on Home Page','RightButFirst',NULL,NULL,NULL,NULL,'',1,1),
 (146,1,145,'Right Side Except Home Pages','RightButNotFirst',NULL,NULL,NULL,NULL,'',2,1),
 (147,1,145,'Right Side on All Pages','RightAll',NULL,NULL,NULL,NULL,'',3,1),
 (148,1,145,'Left Side on Home Page','LeftButFirst',NULL,NULL,NULL,NULL,'',4,1),
 (149,1,145,'Left Side Except Home Pages','LeftButNotFirst',NULL,NULL,NULL,NULL,'',5,1),
 (150,1,145,'Left Side on All Pages','LeftButFirst',NULL,NULL,NULL,NULL,'',6,1),
 (151,1,145,'Customized Location','Custom',NULL,NULL,NULL,NULL,'',7,1),
 (152,1,145,'None','None',NULL,NULL,NULL,NULL,'',8,1),
 (153,1,146,'Right Side on Home Page','RightButFirst',NULL,NULL,NULL,NULL,'',1,1),
 (154,1,146,'Right Side Except Home Pages','RightButNotFirst',NULL,NULL,NULL,NULL,'',2,1),
 (155,1,146,'Right Side on All Pages','RightAll',NULL,NULL,NULL,NULL,'',3,1),
 (156,1,146,'Left Side on Home Page','LeftButFirst',NULL,NULL,NULL,NULL,'',4,1),
 (157,1,146,'Left Side Except Home Pages','LeftButNotFirst',NULL,NULL,NULL,NULL,'',5,1),
 (158,1,146,'Left Side on All Pages','LeftButFirst',NULL,NULL,NULL,NULL,'',6,1),
 (159,1,146,'Customized Location','Custom',NULL,NULL,NULL,NULL,'',7,1),
 (160,1,146,'None','None',NULL,NULL,NULL,NULL,'',8,1),
 (161,1,147,'Kilo Gram','KG',NULL,NULL,NULL,NULL,'',1,1),
 (162,1,147,'Pound','LBS',NULL,NULL,NULL,NULL,'',2,1),
 (163,1,147,'Litter','LTR',NULL,NULL,NULL,NULL,'',3,1),
 (164,1,147,'Foot','FOOT',NULL,NULL,NULL,NULL,'',4,1),
 (165,1,147,'Unit','UNIT',NULL,NULL,NULL,NULL,'',5,1),
 (166,1,148,NULL,'15',NULL,NULL,NULL,NULL,'',1,1),
 (167,1,149,NULL,'15',NULL,NULL,NULL,NULL,'',1,1),
 (168,1,152,NULL,'hqsp786@gmail.com',NULL,NULL,NULL,NULL,'no repeat',2,1),
 (169,1,153,NULL,'paypalpasswordhere',NULL,NULL,NULL,NULL,'no repeat',2,1),
 (170,1,154,NULL,'asset/image_bank/others/paypal.jpg',10,560,10,30,'no repeat',67,1),
 (196,1,184,NULL,NULL,100,20,300,300,'',8,1),
 (197,1,185,'Yes','Yes',NULL,NULL,NULL,NULL,NULL,1,1),
 (198,1,185,'No','No',NULL,NULL,NULL,NULL,NULL,2,1);
/*!40000 ALTER TABLE `ec_attribute_values` ENABLE KEYS */;


--
-- Definition of table `ec_companies`
--

DROP TABLE IF EXISTS `ec_companies`;
CREATE TABLE `ec_companies` (
  `company_code` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) NOT NULL,
  `logo_image_path` varchar(200) DEFAULT NULL,
  `company_name_image` varchar(200) DEFAULT NULL,
  `header_image_path` varchar(200) DEFAULT NULL,
  `background_color` varchar(20) DEFAULT NULL,
  `background_center_color` varchar(20) DEFAULT NULL,
  `page_width` int(4) NOT NULL DEFAULT '776',
  `search_bg_color` varchar(20) DEFAULT NULL,
  `cat_text_color` varchar(20) DEFAULT NULL,
  `cat_text_mouseover_color` varchar(20) DEFAULT NULL,
  `left_bar_color` varchar(20) DEFAULT NULL,
  `right_bar_color` varchar(20) DEFAULT NULL,
  `left_bar_text` varchar(20) NOT NULL,
  `right_bar_text` varchar(20) NOT NULL,
  `cat_box_color` varchar(20) NOT NULL,
  `search_text_option1` varchar(40) DEFAULT NULL,
  `search_text_option1_color` varchar(20) DEFAULT NULL,
  `search_text_option1_link` varchar(200) DEFAULT NULL,
  `search_text_option2` varchar(40) DEFAULT NULL,
  `search_text_option2_color` varchar(20) DEFAULT NULL,
  `search_text_option2_link` varchar(200) DEFAULT NULL,
  `title_text` varchar(200) DEFAULT NULL,
  `footer_text` varchar(200) DEFAULT NULL,
  `prod_disp_top_bar` varchar(200) DEFAULT NULL,
  `home_page_id` int(5) DEFAULT NULL,
  `right_bar_width` int(5) DEFAULT NULL,
  `left_bar_width` int(5) DEFAULT NULL,
  `space_bw_category` int(5) DEFAULT NULL,
  `category_bg_color` varchar(20) DEFAULT NULL,
  `category_bg_image_path` varchar(200) DEFAULT NULL,
  `space_bw_special_offer` int(5) DEFAULT NULL,
  `special_offer_bg_color` varchar(20) DEFAULT NULL,
  `special_offer_bg_image_path` varchar(200) DEFAULT NULL,
  `right_bar_top_image` varchar(200) DEFAULT NULL,
  `right_bar_bottom_image` varchar(200) DEFAULT NULL,
  `left_bar_top_image` varchar(200) DEFAULT NULL,
  `left_bar_bottom_image` varchar(200) DEFAULT NULL,
  `prod_top_disp_bar_path` varchar(200) DEFAULT NULL,
  `prod_bottom_disp_bar_path` varchar(200) DEFAULT NULL,
  `web_bg_image_path` varchar(200) DEFAULT NULL,
  `body_bg_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`company_code`),
  KEY `ec_companies_I_1` (`company_code`),
  CONSTRAINT `FK_ec_companies` FOREIGN KEY (`company_code`) REFERENCES `ec_company_apps_tables` (`company_apps_table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_companies`
--

/*!40000 ALTER TABLE `ec_companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `ec_companies` ENABLE KEYS */;


--
-- Definition of table `ec_company_apps_tables`
--

DROP TABLE IF EXISTS `ec_company_apps_tables`;
CREATE TABLE `ec_company_apps_tables` (
  `company_apps_table_id` int(11) NOT NULL AUTO_INCREMENT,
  `apps_table_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_apps_table_id`),
  KEY `comp_apps_tabs_apps_tab_id_fk` (`apps_table_id`),
  CONSTRAINT `ec_company_apps_tables_ibfk_1` FOREIGN KEY (`apps_table_id`) REFERENCES `ec_apps_tables` (`apps_table_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_company_apps_tables`
--

/*!40000 ALTER TABLE `ec_company_apps_tables` DISABLE KEYS */;
INSERT INTO `ec_company_apps_tables` (`company_apps_table_id`,`apps_table_id`,`company_code`,`is_active`) VALUES 
 (1,1,1,1),
 (2,2,1,1),
 (3,3,1,1),
 (4,4,1,1),
 (5,5,1,1),
 (6,6,1,1),
 (7,7,1,1),
 (8,8,1,1),
 (9,9,1,1),
 (10,10,1,1),
 (11,11,1,1),
 (12,12,1,1),
 (13,13,1,1),
 (14,14,1,1),
 (15,15,1,1),
 (16,16,1,1),
 (17,17,1,1),
 (18,18,1,1),
 (19,19,1,1),
 (20,20,1,1),
 (21,21,1,1),
 (22,22,1,1),
 (23,23,1,1),
 (24,24,1,1),
 (25,25,1,1);
/*!40000 ALTER TABLE `ec_company_apps_tables` ENABLE KEYS */;


--
-- Definition of table `ec_company_attributes`
--

DROP TABLE IF EXISTS `ec_company_attributes`;
CREATE TABLE `ec_company_attributes` (
  `company_code` int(11) NOT NULL,
  `attribute_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`attribute_id`),
  KEY `fk_comp_attr_id` (`attribute_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_company_attributes`
--

/*!40000 ALTER TABLE `ec_company_attributes` DISABLE KEYS */;
INSERT INTO `ec_company_attributes` (`company_code`,`attribute_id`,`display_seq`,`is_active`) VALUES 
 (1,1,1,1),
 (1,2,2,1),
 (1,3,3,1),
 (1,4,4,1),
 (1,5,5,1),
 (1,6,6,1),
 (1,7,7,1),
 (1,8,8,1),
 (1,9,9,1),
 (1,10,10,1),
 (1,11,11,1),
 (1,12,12,1),
 (1,13,13,1),
 (1,14,14,1),
 (1,15,15,1),
 (1,16,16,1),
 (1,17,17,1),
 (1,18,18,1),
 (1,19,19,1),
 (1,20,20,1),
 (1,21,21,1),
 (1,22,22,1),
 (1,23,23,1),
 (1,24,24,1),
 (1,25,25,1),
 (1,26,26,1),
 (1,27,27,1),
 (1,28,28,1),
 (1,29,29,1),
 (1,30,30,1),
 (1,31,31,1),
 (1,32,32,1),
 (1,33,33,1),
 (1,34,34,1),
 (1,35,35,1),
 (1,36,36,1),
 (1,37,37,1),
 (1,38,38,1),
 (1,39,39,1),
 (1,40,40,1),
 (1,41,41,1),
 (1,42,42,1),
 (1,43,43,1),
 (1,44,1,1),
 (1,45,2,1),
 (1,46,3,1),
 (1,47,4,1),
 (1,48,5,1),
 (1,49,6,1),
 (1,50,7,1),
 (1,51,8,1),
 (1,52,9,1),
 (1,53,10,1),
 (1,54,11,1),
 (1,55,12,1),
 (1,56,13,1),
 (1,57,14,1),
 (1,58,15,1),
 (1,59,16,1),
 (1,60,17,1),
 (1,61,18,1),
 (1,62,19,1),
 (1,63,20,1),
 (1,64,21,1),
 (1,65,22,1),
 (1,66,23,1),
 (1,67,24,1),
 (1,68,25,1),
 (1,69,26,1),
 (1,70,27,1),
 (1,71,28,1),
 (1,72,29,1),
 (1,73,30,1),
 (1,74,31,1),
 (1,75,32,1),
 (1,76,33,1),
 (1,77,34,1),
 (1,78,35,1),
 (1,79,36,1),
 (1,80,37,1),
 (1,81,38,1),
 (1,82,39,1),
 (1,83,40,1),
 (1,84,41,1),
 (1,85,42,1),
 (1,86,43,1),
 (1,87,44,1),
 (1,88,45,1),
 (1,89,46,1),
 (1,90,47,1),
 (1,91,48,1),
 (1,92,49,1),
 (1,93,50,1),
 (1,94,51,1),
 (1,95,52,1),
 (1,96,53,1),
 (1,97,54,1),
 (1,98,55,1),
 (1,99,56,1),
 (1,100,57,1),
 (1,101,58,1),
 (1,102,59,1),
 (1,103,60,1),
 (1,104,61,1),
 (1,105,62,1),
 (1,106,63,1),
 (1,107,64,1),
 (1,108,65,1),
 (1,109,66,1),
 (1,110,67,1),
 (1,111,1,1),
 (1,112,2,1),
 (1,113,3,1),
 (1,114,4,1),
 (1,115,5,1),
 (1,116,6,1),
 (1,117,7,1),
 (1,118,8,1),
 (1,119,1,1),
 (1,120,2,1),
 (1,121,3,1),
 (1,122,4,1),
 (1,123,5,1),
 (1,124,6,1),
 (1,125,7,1),
 (1,126,8,1),
 (1,127,9,1),
 (1,128,10,1),
 (1,129,11,1),
 (1,130,12,1),
 (1,131,13,1),
 (1,132,14,1),
 (1,133,15,1),
 (1,134,16,1),
 (1,135,17,1),
 (1,136,18,1),
 (1,137,19,1),
 (1,138,20,1),
 (1,139,21,1),
 (1,140,22,1),
 (1,141,1,1),
 (1,142,2,1),
 (1,143,3,1),
 (1,144,3,1),
 (1,145,1,1),
 (1,146,2,1),
 (1,147,3,1),
 (1,148,4,1),
 (1,149,5,1),
 (1,150,6,1),
 (1,151,7,1),
 (1,152,8,1),
 (1,153,1,1),
 (1,154,2,1),
 (1,155,3,1),
 (1,156,4,1),
 (1,157,5,1),
 (1,158,6,1),
 (1,159,7,1),
 (1,160,8,1),
 (1,161,1,1),
 (1,162,2,1),
 (1,163,3,1),
 (1,164,4,1),
 (1,165,5,1),
 (1,166,6,1),
 (1,167,7,1),
 (1,168,8,1),
 (1,169,9,1),
 (1,170,10,1),
 (1,171,11,1),
 (1,172,12,1),
 (1,173,13,1),
 (1,174,14,1),
 (1,175,15,1),
 (1,176,16,1),
 (1,177,17,1),
 (1,178,18,1),
 (1,179,19,1),
 (1,180,20,1),
 (1,181,21,1),
 (1,183,21,1),
 (1,184,34,1),
 (1,185,35,1);
/*!40000 ALTER TABLE `ec_company_attributes` ENABLE KEYS */;


--
-- Definition of table `ec_setup_attributes`
--

DROP TABLE IF EXISTS `ec_setup_attributes`;
CREATE TABLE `ec_setup_attributes` (
  `attribute_id` int(11) NOT NULL AUTO_INCREMENT,
  `attribute_category_id` int(11) NOT NULL,
  `attribute_desc` tinytext NOT NULL,
  `attribute_name` varchar(100) DEFAULT NULL,
  `stored_location_attribute` varchar(200) DEFAULT NULL,
  `attribute_type` varchar(30) DEFAULT NULL,
  `attribute_datatype` varchar(30) DEFAULT NULL,
  `is_template_base` int(1) NOT NULL,
  `web_template_id` int(11) DEFAULT NULL,
  `is_multi_value` int(1) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`attribute_id`),
  KEY `fk_setup_attr_template_id` (`web_template_id`),
  KEY `fk_ec_setup_attr_category_id` (`attribute_category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=186 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_setup_attributes`
--

/*!40000 ALTER TABLE `ec_setup_attributes` DISABLE KEYS */;
INSERT INTO `ec_setup_attributes` (`attribute_id`,`attribute_category_id`,`attribute_desc`,`attribute_name`,`stored_location_attribute`,`attribute_type`,`attribute_datatype`,`is_template_base`,`web_template_id`,`is_multi_value`,`display_seq`,`is_active`) VALUES 
 (1,1,'Company Logo Path','company_logo_filename','default_comp_admin_images_path','system','Image',0,NULL,0,1,1),
 (2,1,'Company Name Image Path','company_name_image_path','default_comp_admin_images_path','system','Image',0,NULL,0,2,1),
 (3,1,'Favicon','favicon_file','default_comp_admin_images_path','system','Icon',0,NULL,0,3,1),
 (4,1,'Default Company Admin Images Path','default_comp_admin_images_path','','system','path',0,NULL,0,4,1),
 (5,1,'Default Comp Images Path','default_comp_images_path','','system','path',0,NULL,0,5,1),
 (6,1,'Default Prod Images Path','default_prod_images_path','','system','path',0,NULL,0,6,1),
 (7,1,'Default Offer Images Path','default_offer_images_path','','system','path',0,NULL,0,7,1),
 (8,1,'Default Banner Images Path','default_banner_images_path','','system','path',0,NULL,0,8,1),
 (9,1,'Default Other Images Path','default_other_images_path','','system','path',0,NULL,0,9,1),
 (10,1,'Default Js File Path','default_js_file_path','','system','path',0,NULL,0,10,1),
 (11,1,'Default Xml File Path','default_xml_file_path','','system','path',0,NULL,0,11,1),
 (12,1,'Default Css File Path','default_css_file_path','','system','path',0,NULL,0,12,1),
 (13,1,'Default Swf File Path','default_swf_file_path','','system','path',0,NULL,0,13,1),
 (14,1,'Default Avi File Path','default_avi_file_path','','system','path',0,NULL,0,14,1),
 (15,1,'Web Security Logo','web_security_logo_filename','default_comp_admin_images_path','system','Image',0,NULL,0,15,1),
 (16,1,'Payment Security Logo','payment_security_logo_filename','default_comp_admin_images_path','system','Image',0,NULL,0,16,1),
 (17,1,'Member Login Image File','member_login_image_filename','default_comp_admin_images_path','system','Image',0,NULL,0,17,1),
 (18,1,'Member Login Hint','member_login_hint','','system','hint',0,NULL,0,18,1),
 (19,1,'Register Image File','register_image_filename','','system','Image',0,NULL,0,19,1),
 (20,1,'Register Image Hint','register_image_hint','','system','hint',0,NULL,0,20,1),
 (21,1,'Apply Coupon Image File','apply_coupon_image_filename','default_comp_admin_images_path','system','Image',0,NULL,0,21,1),
 (22,1,'Apply Coupon Hint','apply_coupon_hint','','system','hint',0,NULL,0,22,1),
 (23,1,'Giftcard Image File','giftcard_image_filename','default_comp_admin_images_path','system','Image',0,NULL,0,23,1),
 (24,1,'Giftcard Hint','giftcard_hint','','system','hint',0,NULL,0,24,1),
 (25,1,'Orderhistory Image File','orderhistory_image_filename','default_comp_admin_images_path','system','Image',0,NULL,0,25,1),
 (26,1,'Orderhistory Hint','orderhistory_hint','','system','hint',0,NULL,0,26,1),
 (27,1,'No Image Available File','no_image_available_filename','default_comp_admin_images_path','system','Image',0,NULL,0,27,1),
 (28,1,'No Image Available Hint','no_image_available_hint','','system','hint',0,NULL,0,28,1),
 (29,1,'Is Product Downloadable','is_product_downloadable','','option','Int',0,NULL,0,29,1),
 (30,1,'Admin Login Bg Image','admin_login_bg_image_filename','default_comp_admin_images_path','system','Image',0,NULL,0,30,1),
 (31,1,'Invalid Product Message','invalid_product_message','','system','Text',0,NULL,0,31,1),
 (32,1,'Free Shipping Message','free_shipping_message','','system','Text',0,NULL,0,32,1),
 (33,1,'Free Shipping Value','free_shipping_value','','system','Int',0,NULL,0,33,1),
 (34,1,'Privacy Text','privacy_text','','system','Text',0,NULL,0,34,1),
 (35,1,'Privacy Message','privacy_message','','system','Text',0,NULL,0,35,1),
 (36,1,'Return Policy Text','return_policy_text','','system','Text',0,NULL,0,36,1),
 (37,1,'Return Policy Message','return_policy_message','','system','Text',0,NULL,0,37,1),
 (38,1,'Admin Panel Header Image','admin_panel_header_image_filename','default_comp_admin_images_path','system','Image',1,1,0,38,1),
 (39,1,'Admin Panel Footer Image','admin_panel_footer_image_filename','default_comp_admin_images_path','system','Image',1,1,0,39,1),
 (40,1,'Images Possiable Style','image_possaibe_style_list','','system','List',1,1,0,40,1),
 (41,1,'Bg Music Style','bg_music_style_list','','system','List',0,NULL,0,41,1),
 (42,1,'Bg Music File','bg_music_filename','','option','Audio',1,1,0,42,1),
 (43,1,'Inquiry option','is_Inquiry','','system','Text',0,NULL,0,43,1),
 (44,2,'Read More Image','read_more_image_filename','default_comp_admin_images_path','system','Image',1,1,0,1,1),
 (45,2,'Product Top Bar Image','product_top_bar_image_filename','default_comp_admin_images_path','system','Image',1,1,0,2,1),
 (46,2,'Product Bottom Bar Image','product_bottom_bar_image_filename','default_comp_admin_images_path','system','Image',1,1,0,3,1),
 (47,2,'Page Separator Image','page_separator_image_filename','default_comp_admin_images_path','system','Image',1,1,0,4,1),
 (48,2,'Addrecord Image File','addrecord_image_filename','default_other_images_path','system','Image',1,1,0,5,1),
 (49,2,'Addrecord Hint','addrecord_hint','','system','ShowList',1,1,0,6,1),
 (50,2,'Editrecord Image File','editrecord_image_filename','default_other_images_path','system','Image',1,1,0,7,1),
 (51,2,'Editrecord Hint','editrecord_hint','','system','hint',1,1,0,8,1),
 (52,2,'Delrecord Image File','delrecord_image_filename','default_other_images_path','system','Image',1,1,0,9,1),
 (53,2,'Delrecord Hint','delrecord_hint','','system','hint',1,1,0,10,1),
 (54,2,'Saverecord Image File','saverecord_image_filename','default_other_images_path','system','Image',1,1,0,11,1),
 (55,2,'Saverecord Hint','saverecord_hint','','system','hint',1,1,0,12,1),
 (56,2,'Browsfolder Image File','browsfolder_image_filename','default_other_images_path','system','Image',1,1,0,13,1),
 (57,2,'Browsfolder Hint','browsfolder_hint','','system','hint',1,1,0,14,1),
 (58,2,'Calendar Image File','calendar_image_filename','default_other_images_path','system','Image',1,1,0,15,1),
 (59,2,'Calendar Hint','calendar_hint','','system','hint',1,1,0,16,1),
 (60,2,'Calc Image File','calc_image_filename','default_other_images_path','system','Image',1,1,0,17,1),
 (61,2,'Calc Hint','calc_hint','','system','hint',1,1,0,18,1),
 (62,2,'Search Image File','search_image_filename','default_other_images_path','system','Image',1,1,0,19,1),
 (63,2,'Search Hint','search_hint','','system','hint',1,1,0,20,1),
 (64,2,'Viewcart Image File','viewcart_image_filename','default_other_images_path','system','Image',1,1,0,21,1),
 (65,2,'Viewcart Hint','viewcart_hint','','system','hint',1,1,0,22,1),
 (66,2,'Addtocart Image File','addtocart_image_filename','default_other_images_path','system','Image',1,1,0,23,1),
 (67,2,'Addtocart Hint','addtocart_hint','','system','hint',1,1,0,24,1),
 (68,2,'Checkout Image File','checkout_image_filename','default_other_images_path','system','Image',1,1,0,25,1),
 (69,2,'Checkout Hint','checkout_hint','','system','hint',1,1,0,26,1),
 (70,2,'Continue Shopping Image File','continue_shopping_image_filename','default_other_images_path','system','Image',1,1,0,27,1),
 (71,2,'Continue Shopping Hint','continue_shopping_hint','','system','hint',1,1,0,28,1),
 (72,2,'Inquiry Image File','inquiry_image_filename','default_other_images_path','system','Image',1,1,0,29,1),
 (73,2,'Inquiry Hint','inquiry_hint','','system','hint',1,1,0,30,1),
 (74,2,'Nextpage Image File','nextpage_image_filename','default_other_images_path','system','Image',1,1,0,31,1),
 (75,2,'Nextpage Hint','nextpage_hint','','system','hint',1,1,0,32,1),
 (76,2,'Previouspage Image File','previouspage_image_filename','default_other_images_path','system','Image',1,1,0,33,1),
 (77,2,'Previouspage Hint','previouspage_hint','','system','hint',1,1,0,34,1),
 (78,2,'Uppage Image File','uppage_image_filename','default_other_images_path','system','Image',1,1,0,35,1),
 (79,2,'Uppage Hint','uppage_hint','','system','hint',1,1,0,36,1),
 (80,2,'Downpage Image File Path','downpage_image_filename','default_other_images_path','system','Image',1,1,0,37,1),
 (81,2,'Uppage Hint','uppage_hint','','system','hint',1,1,0,38,1),
 (82,2,'Help File Image','help_image_filename','default_other_images_path','system','Image',1,1,0,39,1),
 (83,2,'Help File Text','help_file_hint','','system','hint',1,1,0,40,1),
 (84,2,'Background Image','background_image_filename','default_comp_admin_images_path','system','Image',1,1,0,41,1),
 (85,2,'Background Image Style','background_image_style','','uservalue','List',1,1,0,42,1),
 (86,5,'Background Color','background_color','','uservalue','color',1,1,0,43,1),
 (87,5,'Body Background Color','body_bg_color','','uservalue','color',1,1,0,44,1),
 (88,2,'Body Background Image','body_bg_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,45,1),
 (89,5,'Catelog Text Color','catelog_text_color','','uservalue','color',1,1,0,46,1),
 (90,5,'Catalog Background Color','catalog_bg_color','','uservalue','color',1,1,0,47,1),
 (91,5,'Catelog Mouseover Color','catelog_mouseover_color','','uservalue','color',1,1,0,48,1),
 (92,6,'Catalog Background Normal Image','catalog_bg_normal_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,49,1),
 (93,6,'Catalog Mouseover Background Image','catalog_mouseover_bg_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,50,1),
 (94,6,'Catalog Background Image Path','catalog_bg_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,51,1),
 (95,7,'Header Border Image','header_border_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,52,1),
 (96,7,'Footer Border Image','footer_border_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,53,1),
 (97,7,'Left Border Image','left_border_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,54,1),
 (98,7,'Right Border Image','right_border_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,55,1),
 (99,2,'Search Background Image','search_bg_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,56,1),
 (100,2,'Search Bg Color','search_bg_color','','uservalue','Image',1,1,0,57,1),
 (101,2,'Right Top Bar Heading Text','right_top_bar_heading_text','','uservalue','Image',1,1,0,58,1),
 (102,2,'Right Top Bar Image','right_top_bar_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,59,1),
 (103,2,'Right Bottom Bar Image','right_bottom_bar_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,60,1),
 (104,2,'Left Top Bar Heading Text','left_top_bar_heading_text','','uservalue','Text',1,1,0,61,1),
 (105,2,'Left Top Bar Image Path','left_top_bar_image_path','','uservalue','Image',1,1,0,62,1),
 (106,2,'Left Bottom Bar Image','left_bottom_bar_image_filename','default_comp_admin_images_path','uservalue','Image',1,1,0,63,1),
 (107,2,'Homepage Col1 Image','homepage_col1_image_filename','','uservalue','Image',1,1,0,64,1),
 (108,2,'Homepage Col2 Image','homepage_col2_image_filename','','uservalue','Image',1,1,0,65,1),
 (109,2,'Homepage Col3 Image','homepage_col3_image_filename','','uservalue','Image',1,1,0,66,1),
 (110,2,'Homepage Col4 Image','homepage_col4_image_filename','','uservalue','Image',1,1,0,67,1),
 (111,3,'Company Welcome Text','company_welcome_text','','uservalue','Text',1,1,0,1,1),
 (112,3,'Is Display Current Stock','is_display_current_stock','','option','Text',0,1,0,2,1),
 (113,3,'Default Currency Id','default_currency_id','','system','Int',0,1,0,3,1),
 (114,3,'Order PreFix','order_prefix','','system','Text',0,1,0,4,1),
 (115,6,'Catelog Location','catelog_location','catelog_location_list','uservalue','ShowList',1,1,0,5,1),
 (116,6,'Catelog Main Heading','catelog_main_heading','','uservalue','Text',1,1,0,6,1),
 (117,6,'Catelog Sub Heading','catelog_sub_heading','','uservalue','Text',1,1,0,7,1),
 (118,3,'Vertical Banner Location','vertical_banner_location','vertical_banner_location_list','uservalue','ShowList',1,1,0,8,1),
 (119,4,'Is Shopping Cart','is_shopping_cart','','option','Int',0,1,0,1,1),
 (120,4,'Is Product Price','is_product_price_display','','option','Int',0,1,0,2,1),
 (121,4,'Is Display Wholesale Price','is_display_wholesale_price','','option','Int',0,1,0,3,1),
 (122,4,'Is Display Wholesale Retail Price','is_display_wholesale_retail_price','','option','Int',0,1,0,4,1),
 (123,4,'Is Display Discounted Price','is_display_discounted_price','','option','Int',0,1,0,5,1),
 (124,4,'Is Prod Quality Option','is_prod_quality_option','','option','Int',0,1,0,6,1),
 (125,4,'Is Multi Dimension','is_multi_dimension','','option','Int',0,1,0,7,1),
 (126,4,'Is Additional Prod Info','is_additional_prod_info','','option','Int',0,1,0,8,1),
 (127,4,'Is Product Multi Image','is_product_multi_image','','option','Int',0,1,0,9,1),
 (128,4,'Is Wishlist','is_wishlist','','option','Int',0,1,0,10,1),
 (129,4,'Is Multi Lang','is_multi_lang','','option','Int',0,1,0,11,1),
 (130,4,'Is Multi Packing','is_multi_packing','','option','Int',0,1,0,12,1),
 (131,4,'Is Multi Currency','is_multi_currency','','option','Int',0,1,0,13,1),
 (132,4,'Is Discount Coupons','is_discount_coupons','','option','Int',0,1,0,14,1),
 (133,4,'Is Gift Card Option','is_gift_card_option','','option','Int',0,1,0,15,1),
 (134,4,'Is Multi Color','is_multi_color','','option','Int',0,1,0,16,1),
 (135,4,'Is Packing Price Option','is_packing_price_option','','option','Int',0,1,0,17,1),
 (136,4,'Is Join List','is_join_list','','option','Int',0,1,0,18,1),
 (137,4,'Is Epayment Gatway','is_epayment_gatway','','option','Int',0,1,0,19,1),
 (138,4,'Is Order Management','is_order_management','','option','Int',0,1,0,20,1),
 (139,4,'Is Manufacture Option','is_manufacture_option','','option','Int',0,1,0,21,1),
 (140,4,'Is Distributor Option','is_distributor_option','','option','Int',0,1,0,22,1),
 (141,8,'Default Menu','default_menu_id','','system','Int',0,1,0,22,1),
 (142,8,'Maximum Menu Pad(s)','max_menu_pads','','system','Int',0,1,0,22,1),
 (143,8,'Maximum Menu Pad(s) Level','max_menu_pads_lavel','','system','Int',0,1,0,22,1),
 (144,8,'Company Flash Images Dimension','company_flash_images_dimension','','system','Int',1,1,0,22,1),
 (145,6,'Catelog Location valid Values','catelog_location_list','','uservalue','ListBox',1,1,0,5,1),
 (146,1,'Vertical Banner Location Valid Values','vertical_banner_location_list','','system','ListBox',0,NULL,0,43,1),
 (147,3,'Uom List','uom_list','','system','ListBox',0,1,0,4,1),
 (148,3,'Order # Leading Zero','order_leading_zero','','system','int',0,1,0,4,1),
 (149,3,'Invoice # Leading Zero','invoice_leading_zero','','system','int',0,1,0,4,1),
 (150,3,'Order # Leading Zero','max_order_length','','system','int',0,1,0,4,1),
 (151,3,'Invoice # Leading Zero','max_invoice_length','','system','int',0,1,0,4,1),
 (152,3,'PayPal Account','paypal_account','','system','int',0,1,0,4,1),
 (153,3,'PayPal Account Password','paypal_pwd','','system','int',0,1,0,4,1),
 (154,3,'PayPal Logo','paypal_logo','','system','int',0,1,0,4,1),
 (155,4,'Is Paypal Checkout?','is_paypal','','option','Int',0,NULL,0,1,1),
 (156,5,'Product Default Background Color','prod_default_bg_color','','uservalue','color',1,1,0,43,1),
 (157,5,'Product Hover Background Color','prod_hover_bg_color','','uservalue','color',1,1,0,43,1),
 (158,5,'Max. Product Display in Row','Max_prod_in_row','','uservalue','int',2,NULL,0,43,1),
 (159,5,'Max. Product Display on Page','Max_prod_in_page','','uservalue','int',3,NULL,0,43,1),
 (160,4,'Is Insurance?','mc_is_insurance','','option','Int',0,NULL,0,1,1),
 (161,4,'Is Dependent option?','mc_is_dependent','','option','Int',0,NULL,0,1,1),
 (162,4,'Degree Line 2 Display?','mc_degree_line1_display','','option','Int',0,NULL,0,1,1),
 (163,4,'Degree Line 1 Display?','mc_degree_line2_display','','option','Int',0,NULL,0,1,1),
 (164,4,'Middle Name Display ?','mc_middle_name_display','','option','Int',0,NULL,0,1,1),
 (165,1,'Dafault Date Format','default_date_format','','option','Text',0,NULL,0,17,1),
 (166,1,'Facility','mc_facility_tab1_text','','system','Text',0,NULL,0,1,1),
 (167,1,'Facility Company','mc_facility_tab2_text','','system','Text',0,NULL,0,2,1),
 (168,1,'Facility Timing','mc_facility_tab3_text','','system','Text',0,NULL,0,3,1),
 (169,1,'Doctor Registration','mc_specialist_tab1_text','','system','Text',0,NULL,0,4,1),
 (170,1,'Doctor Facility ','mc_specialist_tab2_text','','system','Text',0,NULL,0,5,1),
 (171,1,'Doctor Timing ','mc_specialist_tab3_text','','system','Text',0,NULL,0,6,1),
 (172,1,'Doctor Services','mc_specialist_tab4_text','','system','Text',0,NULL,0,7,1),
 (173,1,'Question Category','mc_question_tab1_text','','system','Text',0,NULL,0,8,1),
 (174,1,'Medical Question','mc_question_tab2_text','','system','Text',0,NULL,0,9,1),
 (175,1,'Customer Registration','mc_customer_tab1_text','','system','Text',0,NULL,0,10,1),
 (176,1,'Insurance','mc_customer_tab2_text','','system','Text',0,NULL,0,11,1),
 (177,1,'Dependent','mc_customer_tab3_text','','system','Text',0,NULL,0,12,1),
 (178,1,'Doctor','mc_specialist_text','','system','Text',0,NULL,0,13,1),
 (179,1,'Clinic','mc_facility_text','','system','Text',0,NULL,0,14,1),
 (180,1,'State','mc_state_text','','system','Text',0,NULL,0,15,1),
 (181,1,'Phone Line 2 value','mc_phone2_text','','system','Text',0,NULL,0,16,1),
 (182,1,'Clinic','mc_facility_text','','system','Text',0,NULL,0,17,1),
 (183,4,'Is Search Optione','is_search_option','','option','Int',0,1,0,2,1),
 (184,1,'Product image dimension','product_image_dimension','','system','Int',0,NULL,0,34,1),
 (185,1,'Mc is Active Value','mc_is_active_value',NULL,NULL,'text',0,NULL,1,NULL,1);
/*!40000 ALTER TABLE `ec_setup_attributes` ENABLE KEYS */;


--
-- Definition of table `ec_user_attributes`
--

DROP TABLE IF EXISTS `ec_user_attributes`;
CREATE TABLE `ec_user_attributes` (
  `company_code` int(11) NOT NULL,
  `attribute_id` int(11) NOT NULL,
  `login_id` varchar(30) NOT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`attribute_id`,`login_id`),
  KEY `fk_ec_user_attr_login_id` (`login_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_user_attributes`
--

/*!40000 ALTER TABLE `ec_user_attributes` DISABLE KEYS */;
INSERT INTO `ec_user_attributes` (`company_code`,`attribute_id`,`login_id`,`is_active`) VALUES 
 (1,1,'admin',1),
 (1,2,'admin',1),
 (1,3,'admin',1),
 (1,4,'admin',1),
 (1,5,'admin',1),
 (1,6,'admin',1),
 (1,7,'admin',1),
 (1,8,'admin',1),
 (1,9,'admin',1),
 (1,10,'admin',1),
 (1,11,'admin',1),
 (1,12,'admin',1),
 (1,13,'admin',1),
 (1,14,'admin',1),
 (1,15,'admin',1),
 (1,16,'admin',1),
 (1,17,'admin',1),
 (1,18,'admin',1),
 (1,19,'admin',1),
 (1,20,'admin',1),
 (1,21,'admin',1),
 (1,22,'admin',1),
 (1,23,'admin',1),
 (1,24,'admin',1),
 (1,25,'admin',1),
 (1,26,'admin',1),
 (1,27,'admin',1),
 (1,28,'admin',1),
 (1,29,'admin',1),
 (1,30,'admin',1),
 (1,31,'admin',1),
 (1,32,'admin',1),
 (1,33,'admin',1),
 (1,34,'admin',1),
 (1,35,'admin',1),
 (1,36,'admin',1),
 (1,37,'admin',1),
 (1,38,'admin',1),
 (1,39,'admin',1),
 (1,40,'admin',1),
 (1,41,'admin',1),
 (1,42,'admin',1),
 (1,43,'admin',1),
 (1,44,'admin',1),
 (1,45,'admin',1),
 (1,46,'admin',1),
 (1,47,'admin',1),
 (1,48,'admin',1),
 (1,49,'admin',1),
 (1,50,'admin',1),
 (1,51,'admin',1),
 (1,52,'admin',1),
 (1,53,'admin',1),
 (1,54,'admin',1),
 (1,55,'admin',1),
 (1,56,'admin',1),
 (1,57,'admin',1),
 (1,58,'admin',1),
 (1,59,'admin',1),
 (1,60,'admin',1),
 (1,61,'admin',1),
 (1,62,'admin',1),
 (1,63,'admin',1),
 (1,64,'admin',1),
 (1,65,'admin',1),
 (1,66,'admin',1),
 (1,67,'admin',1),
 (1,68,'admin',1),
 (1,69,'admin',1),
 (1,70,'admin',1),
 (1,71,'admin',1),
 (1,72,'admin',1),
 (1,73,'admin',1),
 (1,74,'admin',1),
 (1,75,'admin',1),
 (1,76,'admin',1),
 (1,77,'admin',1),
 (1,78,'admin',1),
 (1,79,'admin',1),
 (1,80,'admin',1),
 (1,81,'admin',1),
 (1,82,'admin',1),
 (1,83,'admin',1),
 (1,84,'admin',1),
 (1,85,'admin',1),
 (1,86,'admin',1),
 (1,87,'admin',1),
 (1,88,'admin',1),
 (1,89,'admin',1),
 (1,90,'admin',1),
 (1,91,'admin',1),
 (1,92,'admin',1),
 (1,93,'admin',1),
 (1,94,'admin',1),
 (1,95,'admin',1),
 (1,96,'admin',1),
 (1,97,'admin',1),
 (1,98,'admin',1),
 (1,99,'admin',1),
 (1,100,'admin',1),
 (1,101,'admin',1),
 (1,102,'admin',1),
 (1,103,'admin',1),
 (1,104,'admin',1),
 (1,105,'admin',1),
 (1,106,'admin',1),
 (1,107,'admin',1),
 (1,108,'admin',1),
 (1,109,'admin',1),
 (1,110,'admin',1),
 (1,111,'admin',1),
 (1,112,'admin',1),
 (1,113,'admin',1),
 (1,114,'admin',1),
 (1,115,'admin',1),
 (1,116,'admin',1),
 (1,117,'admin',1),
 (1,118,'admin',1),
 (1,119,'admin',1),
 (1,120,'admin',1),
 (1,121,'admin',1),
 (1,122,'admin',1),
 (1,123,'admin',1),
 (1,124,'admin',1),
 (1,125,'admin',1),
 (1,126,'admin',1),
 (1,127,'admin',1),
 (1,128,'admin',1),
 (1,129,'admin',1),
 (1,130,'admin',1),
 (1,131,'admin',1),
 (1,132,'admin',1),
 (1,133,'admin',1),
 (1,134,'admin',1),
 (1,135,'admin',1),
 (1,136,'admin',1),
 (1,137,'admin',1),
 (1,138,'admin',1),
 (1,139,'admin',1),
 (1,140,'admin',1),
 (1,141,'admin',1),
 (1,142,'admin',1),
 (1,143,'admin',1),
 (1,144,'admin',1),
 (1,145,'admin',1),
 (1,146,'admin',1),
 (1,147,'admin',1),
 (1,148,'admin',1),
 (1,149,'admin',1),
 (1,150,'admin',1),
 (1,151,'admin',1),
 (1,152,'admin',1),
 (1,153,'admin',1),
 (1,154,'admin',1),
 (1,155,'admin',1),
 (1,156,'admin',1),
 (1,157,'admin',1),
 (1,158,'admin',1),
 (1,159,'admin',1),
 (1,160,'admin',1),
 (1,161,'admin',1),
 (1,162,'admin',1),
 (1,163,'admin',1),
 (1,164,'admin',1),
 (1,165,'admin',1),
 (1,166,'admin',1),
 (1,167,'admin',1),
 (1,168,'admin',1),
 (1,169,'admin',1),
 (1,170,'admin',1),
 (1,171,'admin',1),
 (1,172,'admin',1),
 (1,173,'admin',1),
 (1,174,'admin',1),
 (1,175,'admin',1),
 (1,176,'admin',1),
 (1,177,'admin',1),
 (1,183,'admin',1),
 (1,184,'admin',1);
/*!40000 ALTER TABLE `ec_user_attributes` ENABLE KEYS */;


--
-- Definition of table `ec_web_template_sections`
--

DROP TABLE IF EXISTS `ec_web_template_sections`;
CREATE TABLE `ec_web_template_sections` (
  `template_section_id` int(11) NOT NULL AUTO_INCREMENT,
  `web_template_id` int(11) DEFAULT NULL,
  `template_section_type` varchar(1) DEFAULT NULL,
  `panel_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `css_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `is_display_prod_search` int(1) NOT NULL DEFAULT '0',
  `max_section` int(11) DEFAULT NULL,
  `section_height` int(11) DEFAULT NULL,
  `left_section_width` int(11) DEFAULT NULL,
  `middle_section_width` int(11) DEFAULT NULL,
  `right_section_width` int(11) DEFAULT NULL,
  `left_section_style_id` int(11) DEFAULT NULL,
  `left_section_html_cmd` varchar(4000) DEFAULT NULL,
  `left_section_animation_delay` varchar(10) DEFAULT NULL,
  `middle_section_style_id` int(11) DEFAULT NULL,
  `middle_section_html_cmd` varchar(4000) DEFAULT NULL,
  `middle_section_animation_delay` varchar(10) DEFAULT NULL,
  `right_section_style_id` int(11) DEFAULT NULL,
  `right_section_html_cmd` varchar(400) DEFAULT NULL,
  `right_section_animation_delay` varchar(20) DEFAULT NULL,
  `page_button_images_section` varchar(1) DEFAULT NULL,
  `right_section_banner_id` int(11) DEFAULT NULL,
  `middle_section_banner_id` int(11) DEFAULT NULL,
  `left_section_banner_id` int(11) DEFAULT NULL,
  `left_banner_animation_delay` varchar(10) DEFAULT NULL,
  `middle_banner_animation_delay` varchar(10) DEFAULT NULL,
  `right_banner_animation_delay` varchar(10) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`template_section_id`),
  UNIQUE KEY `pk_ec_web_template_sections` (`template_section_id`),
  KEY `fk_ec_panel_id` (`panel_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_web_template_sections`
--

/*!40000 ALTER TABLE `ec_web_template_sections` DISABLE KEYS */;
/*!40000 ALTER TABLE `ec_web_template_sections` ENABLE KEYS */;


--
-- Definition of table `ec_web_templates`
--

DROP TABLE IF EXISTS `ec_web_templates`;
CREATE TABLE `ec_web_templates` (
  `web_template_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_template_id` int(11) DEFAULT NULL,
  `web_template_name` varchar(100) DEFAULT NULL,
  `web_template_abrv` varchar(10) DEFAULT NULL,
  `web_template_width` int(11) DEFAULT NULL,
  `web_template_height` int(11) DEFAULT NULL,
  `template_category_id` int(11) DEFAULT NULL,
  `web_template_type` varchar(1) DEFAULT NULL,
  `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`web_template_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_web_templates`
--

/*!40000 ALTER TABLE `ec_web_templates` DISABLE KEYS */;
INSERT INTO `ec_web_templates` (`web_template_id`,`parent_template_id`,`web_template_name`,`web_template_abrv`,`web_template_width`,`web_template_height`,`template_category_id`,`web_template_type`,`create_date`,`is_active`) VALUES 
 (1,NULL,'MyFirst Template-Home','TP0001',80,NULL,NULL,NULL,NULL,1),
 (2,1,'MyFirst Template-Normal','TP0001',80,NULL,NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `ec_web_templates` ENABLE KEYS */;


--
-- Definition of table `ec_web_templates_events`
--

DROP TABLE IF EXISTS `ec_web_templates_events`;
CREATE TABLE `ec_web_templates_events` (
  `template_event_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `web_template_id` int(11) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  PRIMARY KEY (`template_event_id`,`company_code`),
  KEY `fk_web_temp_event_company_code` (`company_code`),
  KEY `fk_ec_web_temp_event_temp_id` (`web_template_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ec_web_templates_events`
--

/*!40000 ALTER TABLE `ec_web_templates_events` DISABLE KEYS */;
INSERT INTO `ec_web_templates_events` (`template_event_id`,`company_code`,`web_template_id`,`start_date`,`end_date`,`create_date`) VALUES 
 (1,1,1,'2010-01-01','2011-06-30','2010-01-01'),
 (2,1,2,'2011-07-01','2011-12-31','2010-01-01');
/*!40000 ALTER TABLE `ec_web_templates_events` ENABLE KEYS */;


--
-- Definition of table `mc_attribute_values`
--

DROP TABLE IF EXISTS `mc_attribute_values`;
CREATE TABLE `mc_attribute_values` (
  `attribute_value_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) DEFAULT NULL,
  `attribute_id` int(11) DEFAULT NULL,
  `attribute_value_desc` tinytext,
  `attribute_value` varchar(200) DEFAULT NULL,
  `top_padding` int(11) DEFAULT NULL,
  `left_padding` int(11) DEFAULT NULL,
  `attribute_height` int(11) DEFAULT NULL,
  `attribute_width` int(11) DEFAULT NULL,
  `attribute_style` varchar(20) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`attribute_value_id`),
  KEY `fk_ec_attr_val_comp_attr_id` (`company_code`,`attribute_id`)
) ENGINE=MyISAM AUTO_INCREMENT=166 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_attribute_values`
--

/*!40000 ALTER TABLE `mc_attribute_values` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_attribute_values` ENABLE KEYS */;


--
-- Definition of table `mc_background_images`
--

DROP TABLE IF EXISTS `mc_background_images`;
CREATE TABLE `mc_background_images` (
  `background_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `background_image_desc` varchar(40) DEFAULT NULL,
  `background_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`background_image_id`),
  UNIQUE KEY `pk_ec_background_images` (`background_image_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_background_images`
--

/*!40000 ALTER TABLE `mc_background_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_background_images` ENABLE KEYS */;


--
-- Definition of table `mc_banners`
--

DROP TABLE IF EXISTS `mc_banners`;
CREATE TABLE `mc_banners` (
  `banner_id` int(11) NOT NULL AUTO_INCREMENT,
  `banner_name` varchar(20) DEFAULT NULL,
  `banner_desc` blob,
  `banner_type` varchar(2) DEFAULT NULL,
  `banner_location` varchar(1) DEFAULT NULL,
  `banner_link_path` varchar(200) DEFAULT NULL,
  `banner_height` varchar(10) DEFAULT NULL,
  `banner_width` varchar(10) DEFAULT NULL,
  `css_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `prod_thumbnail_path` varchar(200) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`banner_id`),
  UNIQUE KEY `pk_ec_banners` (`banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_banners`
--

/*!40000 ALTER TABLE `mc_banners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_banners` ENABLE KEYS */;


--
-- Definition of table `mc_banners_special_offers`
--

DROP TABLE IF EXISTS `mc_banners_special_offers`;
CREATE TABLE `mc_banners_special_offers` (
  `banner_id` int(11) NOT NULL,
  `offer_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`banner_id`,`offer_id`),
  UNIQUE KEY `pk_ec_banners_special_offers` (`banner_id`,`offer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_banners_special_offers`
--

/*!40000 ALTER TABLE `mc_banners_special_offers` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_banners_special_offers` ENABLE KEYS */;


--
-- Definition of table `mc_bg_music`
--

DROP TABLE IF EXISTS `mc_bg_music`;
CREATE TABLE `mc_bg_music` (
  `bg_music_id` int(11) NOT NULL AUTO_INCREMENT,
  `bg_music_list_name` varchar(50) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`bg_music_id`),
  UNIQUE KEY `pk_ec_bg_music` (`bg_music_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_bg_music`
--

/*!40000 ALTER TABLE `mc_bg_music` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_bg_music` ENABLE KEYS */;


--
-- Definition of table `mc_bg_music_list`
--

DROP TABLE IF EXISTS `mc_bg_music_list`;
CREATE TABLE `mc_bg_music_list` (
  `bg_music_list_id` int(11) NOT NULL AUTO_INCREMENT,
  `bg_music_id` int(11) DEFAULT NULL,
  `bg_music_file_path` varchar(200) DEFAULT NULL,
  `bg_music_file_desc` varchar(50) DEFAULT NULL,
  `play_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`bg_music_list_id`),
  UNIQUE KEY `pk_ec_bg_music_list` (`bg_music_list_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_bg_music_list`
--

/*!40000 ALTER TABLE `mc_bg_music_list` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_bg_music_list` ENABLE KEYS */;


--
-- Definition of table `mc_billing_info`
--

DROP TABLE IF EXISTS `mc_billing_info`;
CREATE TABLE `mc_billing_info` (
  `billing_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) DEFAULT NULL,
  `sno` int(11) DEFAULT NULL,
  `title` varchar(4) DEFAULT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `middle_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `street_address` varchar(50) DEFAULT NULL,
  `city` varchar(20) DEFAULT NULL,
  `state_code` varchar(20) DEFAULT NULL,
  `zip_code` varchar(10) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `cc_no` varchar(20) DEFAULT NULL,
  `sec_code` varchar(3) DEFAULT NULL,
  `exp_month` int(11) DEFAULT NULL,
  `exp_year` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`billing_info_id`),
  KEY `fk_billing_info_cust_id` (`customer_id`),
  KEY `fk_billing_info_country_id` (`country_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_billing_info`
--

/*!40000 ALTER TABLE `mc_billing_info` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_billing_info` ENABLE KEYS */;


--
-- Definition of table `mc_border_images`
--

DROP TABLE IF EXISTS `mc_border_images`;
CREATE TABLE `mc_border_images` (
  `border_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `border_image_desc` varchar(40) DEFAULT NULL,
  `border_image_type` varchar(1) DEFAULT NULL,
  `border_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`border_image_id`),
  UNIQUE KEY `pk_ec_border_images` (`border_image_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_border_images`
--

/*!40000 ALTER TABLE `mc_border_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_border_images` ENABLE KEYS */;


--
-- Definition of table `mc_bullets_images`
--

DROP TABLE IF EXISTS `mc_bullets_images`;
CREATE TABLE `mc_bullets_images` (
  `bullet_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `bullet_image_desc` varchar(50) DEFAULT NULL,
  `bullet_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`bullet_image_id`),
  UNIQUE KEY `pk_ec_bullets_images` (`bullet_image_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_bullets_images`
--

/*!40000 ALTER TABLE `mc_bullets_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_bullets_images` ENABLE KEYS */;


--
-- Definition of table `mc_categories`
--

DROP TABLE IF EXISTS `mc_categories`;
CREATE TABLE `mc_categories` (
  `category_code` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(30) NOT NULL,
  `category_desc` varchar(255) DEFAULT NULL,
  `parent_category_code` int(11) DEFAULT NULL,
  `display_seq` int(11) NOT NULL,
  `category_level` int(4) NOT NULL DEFAULT '1',
  `is_active` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`category_code`),
  KEY `ec_categories_FI_1` (`parent_category_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_categories`
--

/*!40000 ALTER TABLE `mc_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_categories` ENABLE KEYS */;


--
-- Definition of table `mc_category_banners`
--

DROP TABLE IF EXISTS `mc_category_banners`;
CREATE TABLE `mc_category_banners` (
  `category_code` int(11) NOT NULL,
  `banner_id` int(11) NOT NULL,
  `category_image_path` varchar(20) DEFAULT NULL,
  `category_image_text` varchar(20) DEFAULT NULL,
  `category_image_link` varchar(200) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`category_code`,`banner_id`),
  UNIQUE KEY `pk_ec_category_banners` (`category_code`,`banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_category_banners`
--

/*!40000 ALTER TABLE `mc_category_banners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_category_banners` ENABLE KEYS */;


--
-- Definition of table `mc_category_images`
--

DROP TABLE IF EXISTS `mc_category_images`;
CREATE TABLE `mc_category_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_code` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `flash_image_path` varchar(200) DEFAULT NULL,
  `flash_image_type` varchar(4) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `ec_category_images_I_1` (`id`),
  KEY `ec_category_images_FI_1` (`category_code`),
  CONSTRAINT `ec_category_images_FK_1` FOREIGN KEY (`category_code`) REFERENCES `mc_categories` (`category_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_category_images`
--

/*!40000 ALTER TABLE `mc_category_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_category_images` ENABLE KEYS */;


--
-- Definition of table `mc_comapany_domain`
--

DROP TABLE IF EXISTS `mc_comapany_domain`;
CREATE TABLE `mc_comapany_domain` (
  `company_code` double DEFAULT NULL,
  `domain_name` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_comapany_domain`
--

/*!40000 ALTER TABLE `mc_comapany_domain` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_comapany_domain` ENABLE KEYS */;


--
-- Definition of table `mc_companies`
--

DROP TABLE IF EXISTS `mc_companies`;
CREATE TABLE `mc_companies` (
  `company_code` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) NOT NULL,
  `logo_image_path` varchar(200) DEFAULT NULL,
  `company_name_image` varchar(200) DEFAULT NULL,
  `header_image_path` varchar(200) DEFAULT NULL,
  `background_color` varchar(20) DEFAULT NULL,
  `background_center_color` varchar(20) DEFAULT NULL,
  `page_width` int(4) NOT NULL DEFAULT '776',
  `search_bg_color` varchar(20) DEFAULT NULL,
  `cat_text_color` varchar(20) DEFAULT NULL,
  `cat_text_mouseover_color` varchar(20) DEFAULT NULL,
  `left_bar_color` varchar(20) DEFAULT NULL,
  `right_bar_color` varchar(20) DEFAULT NULL,
  `left_bar_text` varchar(20) NOT NULL,
  `right_bar_text` varchar(20) NOT NULL,
  `cat_box_color` varchar(20) NOT NULL,
  `search_text_option1` varchar(40) DEFAULT NULL,
  `search_text_option1_color` varchar(20) DEFAULT NULL,
  `search_text_option1_link` varchar(200) DEFAULT NULL,
  `search_text_option2` varchar(40) DEFAULT NULL,
  `search_text_option2_color` varchar(20) DEFAULT NULL,
  `search_text_option2_link` varchar(200) DEFAULT NULL,
  `title_text` varchar(200) DEFAULT NULL,
  `footer_text` varchar(200) DEFAULT NULL,
  `prod_disp_top_bar` varchar(200) DEFAULT NULL,
  `home_page_id` int(5) DEFAULT NULL,
  `right_bar_width` int(5) DEFAULT NULL,
  `left_bar_width` int(5) DEFAULT NULL,
  `space_bw_category` int(5) DEFAULT NULL,
  `category_bg_color` varchar(20) DEFAULT NULL,
  `category_bg_image_path` varchar(200) DEFAULT NULL,
  `space_bw_special_offer` int(5) DEFAULT NULL,
  `special_offer_bg_color` varchar(20) DEFAULT NULL,
  `special_offer_bg_image_path` varchar(200) DEFAULT NULL,
  `right_bar_top_image` varchar(200) DEFAULT NULL,
  `right_bar_bottom_image` varchar(200) DEFAULT NULL,
  `left_bar_top_image` varchar(200) DEFAULT NULL,
  `left_bar_bottom_image` varchar(200) DEFAULT NULL,
  `prod_top_disp_bar_path` varchar(200) DEFAULT NULL,
  `prod_bottom_disp_bar_path` varchar(200) DEFAULT NULL,
  `web_bg_image_path` varchar(200) DEFAULT NULL,
  `body_bg_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`company_code`),
  KEY `ec_companies_I_1` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_companies`
--

/*!40000 ALTER TABLE `mc_companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_companies` ENABLE KEYS */;


--
-- Definition of table `mc_company_attribute_category`
--

DROP TABLE IF EXISTS `mc_company_attribute_category`;
CREATE TABLE `mc_company_attribute_category` (
  `company_code` int(11) NOT NULL,
  `attribute_category_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`attribute_category_id`),
  KEY `fk_comp_attribute_category_id` (`attribute_category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_attribute_category`
--

/*!40000 ALTER TABLE `mc_company_attribute_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_attribute_category` ENABLE KEYS */;


--
-- Definition of table `mc_company_attributes`
--

DROP TABLE IF EXISTS `mc_company_attributes`;
CREATE TABLE `mc_company_attributes` (
  `company_code` int(11) NOT NULL,
  `attribute_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`attribute_id`),
  KEY `fk_comp_attr_id` (`attribute_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_attributes`
--

/*!40000 ALTER TABLE `mc_company_attributes` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_attributes` ENABLE KEYS */;


--
-- Definition of table `mc_company_background_images`
--

DROP TABLE IF EXISTS `mc_company_background_images`;
CREATE TABLE `mc_company_background_images` (
  `company_code` int(11) NOT NULL,
  `background_image_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`background_image_id`),
  UNIQUE KEY `pk_ec_company_background_image` (`company_code`,`background_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_background_images`
--

/*!40000 ALTER TABLE `mc_company_background_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_background_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_banners`
--

DROP TABLE IF EXISTS `mc_company_banners`;
CREATE TABLE `mc_company_banners` (
  `company_code` int(11) NOT NULL,
  `banner_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`banner_id`),
  UNIQUE KEY `pk_ec_company_banners` (`company_code`,`banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_banners`
--

/*!40000 ALTER TABLE `mc_company_banners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_banners` ENABLE KEYS */;


--
-- Definition of table `mc_company_bg_music`
--

DROP TABLE IF EXISTS `mc_company_bg_music`;
CREATE TABLE `mc_company_bg_music` (
  `company_code` int(11) NOT NULL,
  `bg_music_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`bg_music_id`),
  UNIQUE KEY `pk_ec_company_bg_music` (`company_code`,`bg_music_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_bg_music`
--

/*!40000 ALTER TABLE `mc_company_bg_music` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_bg_music` ENABLE KEYS */;


--
-- Definition of table `mc_company_border_images`
--

DROP TABLE IF EXISTS `mc_company_border_images`;
CREATE TABLE `mc_company_border_images` (
  `border_image_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`border_image_id`),
  KEY `ec_company_order_images_FI_2` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_border_images`
--

/*!40000 ALTER TABLE `mc_company_border_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_border_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_bullets_images`
--

DROP TABLE IF EXISTS `mc_company_bullets_images`;
CREATE TABLE `mc_company_bullets_images` (
  `company_code` int(11) NOT NULL,
  `bullet_image_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`bullet_image_id`),
  UNIQUE KEY `pk_ec_company_bullets_images` (`company_code`,`bullet_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_bullets_images`
--

/*!40000 ALTER TABLE `mc_company_bullets_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_bullets_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_category`
--

DROP TABLE IF EXISTS `mc_company_category`;
CREATE TABLE `mc_company_category` (
  `company_code` int(11) NOT NULL,
  `category_code` int(11) NOT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`),
  KEY `ec_company_category_FI_1` (`company_code`),
  KEY `ec_company_category_FI_2` (`category_code`),
  CONSTRAINT `ec_company_category_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`),
  CONSTRAINT `ec_company_category_FK_2` FOREIGN KEY (`category_code`) REFERENCES `mc_categories` (`category_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_category`
--

/*!40000 ALTER TABLE `mc_company_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_category` ENABLE KEYS */;


--
-- Definition of table `mc_company_coupons`
--

DROP TABLE IF EXISTS `mc_company_coupons`;
CREATE TABLE `mc_company_coupons` (
  `company_code` int(11) NOT NULL,
  `coupon_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`coupon_id`),
  KEY `fk_company_coupons_coupon_id` (`coupon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_coupons`
--

/*!40000 ALTER TABLE `mc_company_coupons` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_coupons` ENABLE KEYS */;


--
-- Definition of table `mc_company_currency`
--

DROP TABLE IF EXISTS `mc_company_currency`;
CREATE TABLE `mc_company_currency` (
  `company_code` int(11) NOT NULL,
  `currency_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`currency_id`),
  KEY `fk_company_currency_curr_id` (`currency_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_currency`
--

/*!40000 ALTER TABLE `mc_company_currency` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_currency` ENABLE KEYS */;


--
-- Definition of table `mc_company_customers`
--

DROP TABLE IF EXISTS `mc_company_customers`;
CREATE TABLE `mc_company_customers` (
  `company_code` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`customer_id`),
  KEY `fk_company_customers_cust_id` (`customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_customers`
--

/*!40000 ALTER TABLE `mc_company_customers` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_customers` ENABLE KEYS */;


--
-- Definition of table `mc_company_facility`
--

DROP TABLE IF EXISTS `mc_company_facility`;
CREATE TABLE `mc_company_facility` (
  `company_facility_id` int(11) NOT NULL AUTO_INCREMENT,
  `facility_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_default` int(1) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_facility_id`),
  KEY `cust_facilty_facilty_id_fk` (`facility_id`),
  CONSTRAINT `mc_company_facility_ibfk_1` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_facility`
--

/*!40000 ALTER TABLE `mc_company_facility` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_facility` ENABLE KEYS */;


--
-- Definition of table `mc_company_flash_images`
--

DROP TABLE IF EXISTS `mc_company_flash_images`;
CREATE TABLE `mc_company_flash_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `flash_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `ec_company_flash_images_I_1` (`id`),
  KEY `ec_company_flash_images_FI_1` (`company_code`),
  CONSTRAINT `ec_company_flash_images_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_flash_images`
--

/*!40000 ALTER TABLE `mc_company_flash_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_flash_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_gift_cards`
--

DROP TABLE IF EXISTS `mc_company_gift_cards`;
CREATE TABLE `mc_company_gift_cards` (
  `company_code` int(11) NOT NULL,
  `gift_card_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`gift_card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_company_gift_cards`
--

/*!40000 ALTER TABLE `mc_company_gift_cards` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_gift_cards` ENABLE KEYS */;


--
-- Definition of table `mc_company_image_corners`
--

DROP TABLE IF EXISTS `mc_company_image_corners`;
CREATE TABLE `mc_company_image_corners` (
  `image_corner_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  PRIMARY KEY (`image_corner_id`,`company_code`),
  UNIQUE KEY `pk_ec_company_image_corners` (`image_corner_id`,`company_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_image_corners`
--

/*!40000 ALTER TABLE `mc_company_image_corners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_image_corners` ENABLE KEYS */;


--
-- Definition of table `mc_company_languages`
--

DROP TABLE IF EXISTS `mc_company_languages`;
CREATE TABLE `mc_company_languages` (
  `company_code` int(11) NOT NULL,
  `language_id` int(11) NOT NULL,
  `display_seq` varchar(20) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`company_code`,`language_id`),
  UNIQUE KEY `pk_ec_company_languages` (`company_code`,`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_languages`
--

/*!40000 ALTER TABLE `mc_company_languages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_languages` ENABLE KEYS */;


--
-- Definition of table `mc_company_locations`
--

DROP TABLE IF EXISTS `mc_company_locations`;
CREATE TABLE `mc_company_locations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `location_id` int(11) DEFAULT NULL,
  `company_code` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_locations`
--

/*!40000 ALTER TABLE `mc_company_locations` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_locations` ENABLE KEYS */;


--
-- Definition of table `mc_company_orders`
--

DROP TABLE IF EXISTS `mc_company_orders`;
CREATE TABLE `mc_company_orders` (
  `company_code` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`order_id`),
  KEY `fk_company_orders_order_id` (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_orders`
--

/*!40000 ALTER TABLE `mc_company_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_orders` ENABLE KEYS */;


--
-- Definition of table `mc_company_page_button_images`
--

DROP TABLE IF EXISTS `mc_company_page_button_images`;
CREATE TABLE `mc_company_page_button_images` (
  `company_code` int(11) NOT NULL,
  `page_id` int(11) NOT NULL,
  `button_image_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`page_id`,`button_image_id`),
  UNIQUE KEY `pk_ec_company_page_button_imag` (`company_code`,`page_id`,`button_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_page_button_images`
--

/*!40000 ALTER TABLE `mc_company_page_button_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_page_button_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_page_detail`
--

DROP TABLE IF EXISTS `mc_company_page_detail`;
CREATE TABLE `mc_company_page_detail` (
  `company_code` double DEFAULT NULL,
  `page_id` double DEFAULT NULL,
  `display_seq` double DEFAULT NULL,
  `page_text` blob,
  `page_image_path` varchar(600) DEFAULT NULL,
  `thumbnails_path` varchar(600) DEFAULT NULL,
  `download_file_text` varchar(300) DEFAULT NULL,
  `download_file_link` varchar(300) DEFAULT NULL,
  `email_address` varchar(150) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_page_detail`
--

/*!40000 ALTER TABLE `mc_company_page_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_page_detail` ENABLE KEYS */;


--
-- Definition of table `mc_company_pages`
--

DROP TABLE IF EXISTS `mc_company_pages`;
CREATE TABLE `mc_company_pages` (
  `page_id` double DEFAULT NULL,
  `company_code` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  `id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_pages`
--

/*!40000 ALTER TABLE `mc_company_pages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_pages` ENABLE KEYS */;


--
-- Definition of table `mc_company_panels`
--

DROP TABLE IF EXISTS `mc_company_panels`;
CREATE TABLE `mc_company_panels` (
  `company_code` int(11) NOT NULL,
  `panel_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`panel_id`),
  UNIQUE KEY `pk_ec_company_panels` (`company_code`,`panel_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_panels`
--

/*!40000 ALTER TABLE `mc_company_panels` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_panels` ENABLE KEYS */;


--
-- Definition of table `mc_company_payment_methods`
--

DROP TABLE IF EXISTS `mc_company_payment_methods`;
CREATE TABLE `mc_company_payment_methods` (
  `payment_method_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `api_cmd` varchar(4000) DEFAULT NULL,
  `payment_method_icon_path` varchar(200) DEFAULT NULL,
  `user_name` varchar(30) DEFAULT NULL,
  `pass_code` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`payment_method_id`,`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_company_payment_methods`
--

/*!40000 ALTER TABLE `mc_company_payment_methods` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_payment_methods` ENABLE KEYS */;


--
-- Definition of table `mc_company_prod_quality`
--

DROP TABLE IF EXISTS `mc_company_prod_quality`;
CREATE TABLE `mc_company_prod_quality` (
  `company_code` int(11) NOT NULL,
  `quality_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`company_code`,`quality_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_company_prod_quality`
--

/*!40000 ALTER TABLE `mc_company_prod_quality` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_prod_quality` ENABLE KEYS */;


--
-- Definition of table `mc_company_product_colors`
--

DROP TABLE IF EXISTS `mc_company_product_colors`;
CREATE TABLE `mc_company_product_colors` (
  `company_code` int(11) NOT NULL,
  `color_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`color_id`),
  KEY `fk_company_prod_color_id` (`color_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_product_colors`
--

/*!40000 ALTER TABLE `mc_company_product_colors` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_product_colors` ENABLE KEYS */;


--
-- Definition of table `mc_company_product_images`
--

DROP TABLE IF EXISTS `mc_company_product_images`;
CREATE TABLE `mc_company_product_images` (
  `comp_prod_image_id` int(11) NOT NULL,
  `prod_image_id` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `color_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`comp_prod_image_id`),
  KEY `fk_comp_prod_image_id` (`prod_image_id`),
  KEY `fk_comp_prod_img_color_id` (`company_code`,`color_id`),
  KEY `fk_comp_prod_images_prod_cd` (`prod_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_product_images`
--

/*!40000 ALTER TABLE `mc_company_product_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_product_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_product_type`
--

DROP TABLE IF EXISTS `mc_company_product_type`;
CREATE TABLE `mc_company_product_type` (
  `company_code` int(11) NOT NULL,
  `prod_type_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`prod_type_id`),
  KEY `fk_comp_prod_type_id` (`prod_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_product_type`
--

/*!40000 ALTER TABLE `mc_company_product_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_product_type` ENABLE KEYS */;


--
-- Definition of table `mc_company_questions`
--

DROP TABLE IF EXISTS `mc_company_questions`;
CREATE TABLE `mc_company_questions` (
  `company_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `mc_question_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `condition_alert` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_question_id`),
  KEY `comp_quest_quest_id_fk` (`mc_question_id`),
  CONSTRAINT `mc_company_questions_ibfk_1` FOREIGN KEY (`mc_question_id`) REFERENCES `mc_questions` (`mc_question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_questions`
--

/*!40000 ALTER TABLE `mc_company_questions` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_questions` ENABLE KEYS */;


--
-- Definition of table `mc_company_search_images`
--

DROP TABLE IF EXISTS `mc_company_search_images`;
CREATE TABLE `mc_company_search_images` (
  `company_code` int(11) NOT NULL,
  `search_image_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`search_image_id`),
  UNIQUE KEY `pk_ec_company_search_images` (`company_code`,`search_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_search_images`
--

/*!40000 ALTER TABLE `mc_company_search_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_search_images` ENABLE KEYS */;


--
-- Definition of table `mc_company_seo`
--

DROP TABLE IF EXISTS `mc_company_seo`;
CREATE TABLE `mc_company_seo` (
  `company_seo_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `seo_tag_cmd` varchar(500) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_seo_id`),
  KEY `fk_company_seo_comp_id` (`company_code`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_seo`
--

/*!40000 ALTER TABLE `mc_company_seo` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_seo` ENABLE KEYS */;


--
-- Definition of table `mc_company_shipping_methods`
--

DROP TABLE IF EXISTS `mc_company_shipping_methods`;
CREATE TABLE `mc_company_shipping_methods` (
  `shipping_method_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `api_cmd` varchar(4000) DEFAULT NULL,
  `shipping_method_icon_path` varchar(200) DEFAULT NULL,
  `user_name` varchar(50) DEFAULT NULL,
  `pass_code` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`shipping_method_id`,`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_company_shipping_methods`
--

/*!40000 ALTER TABLE `mc_company_shipping_methods` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_shipping_methods` ENABLE KEYS */;


--
-- Definition of table `mc_company_size`
--

DROP TABLE IF EXISTS `mc_company_size`;
CREATE TABLE `mc_company_size` (
  `company_code` int(11) NOT NULL,
  `size_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`size_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_company_size`
--

/*!40000 ALTER TABLE `mc_company_size` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_size` ENABLE KEYS */;


--
-- Definition of table `mc_company_special_offer`
--

DROP TABLE IF EXISTS `mc_company_special_offer`;
CREATE TABLE `mc_company_special_offer` (
  `offer_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  PRIMARY KEY (`offer_id`,`company_code`),
  KEY `ec_company_special_offer_FI_2` (`company_code`),
  CONSTRAINT `ec_company_special_offer_FK_1` FOREIGN KEY (`offer_id`) REFERENCES `mc_special_offers` (`offer_id`),
  CONSTRAINT `ec_company_special_offer_FK_2` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_special_offer`
--

/*!40000 ALTER TABLE `mc_company_special_offer` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_special_offer` ENABLE KEYS */;


--
-- Definition of table `mc_company_users`
--

DROP TABLE IF EXISTS `mc_company_users`;
CREATE TABLE `mc_company_users` (
  `login_id` varchar(30) NOT NULL,
  `company_code` int(11) NOT NULL,
  PRIMARY KEY (`login_id`,`company_code`),
  KEY `ec_company_users_FI_2` (`company_code`),
  CONSTRAINT `ec_company_users_FK_1` FOREIGN KEY (`login_id`) REFERENCES `mc_users` (`login_id`),
  CONSTRAINT `ec_company_users_FK_2` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_users`
--

/*!40000 ALTER TABLE `mc_company_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_users` ENABLE KEYS */;


--
-- Definition of table `mc_company_web_options`
--

DROP TABLE IF EXISTS `mc_company_web_options`;
CREATE TABLE `mc_company_web_options` (
  `company_code` int(11) NOT NULL,
  `login_id` varchar(30) NOT NULL,
  `web_option_id` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`login_id`,`web_option_id`),
  KEY `ec_company_web_options_FI_2` (`login_id`),
  KEY `ec_company_web_options_FI_3` (`web_option_id`),
  CONSTRAINT `ec_company_web_options_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`),
  CONSTRAINT `ec_company_web_options_FK_2` FOREIGN KEY (`login_id`) REFERENCES `mc_users` (`login_id`),
  CONSTRAINT `ec_company_web_options_FK_3` FOREIGN KEY (`web_option_id`) REFERENCES `mc_web_options` (`web_option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_company_web_options`
--

/*!40000 ALTER TABLE `mc_company_web_options` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_company_web_options` ENABLE KEYS */;


--
-- Definition of table `mc_corner_images`
--

DROP TABLE IF EXISTS `mc_corner_images`;
CREATE TABLE `mc_corner_images` (
  `image_corner_id` int(11) NOT NULL AUTO_INCREMENT,
  `image_name` varchar(20) DEFAULT NULL,
  `image_corner_path` varchar(200) DEFAULT NULL,
  `corner_type` varchar(1) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`image_corner_id`),
  UNIQUE KEY `pk_ec_corner_images` (`image_corner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_corner_images`
--

/*!40000 ALTER TABLE `mc_corner_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_corner_images` ENABLE KEYS */;


--
-- Definition of table `mc_countries`
--

DROP TABLE IF EXISTS `mc_countries`;
CREATE TABLE `mc_countries` (
  `country_id` int(11) NOT NULL AUTO_INCREMENT,
  `country_name` varchar(20) DEFAULT NULL,
  `country_abrv` varchar(5) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`country_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_countries`
--

/*!40000 ALTER TABLE `mc_countries` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_countries` ENABLE KEYS */;


--
-- Definition of table `mc_country_base_language`
--

DROP TABLE IF EXISTS `mc_country_base_language`;
CREATE TABLE `mc_country_base_language` (
  `country_id` int(11) NOT NULL,
  `company_code` int(11) DEFAULT NULL,
  `language_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`country_id`),
  UNIQUE KEY `pk_ec_country_base_language` (`country_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_country_base_language`
--

/*!40000 ALTER TABLE `mc_country_base_language` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_country_base_language` ENABLE KEYS */;


--
-- Definition of table `mc_coupon_products`
--

DROP TABLE IF EXISTS `mc_coupon_products`;
CREATE TABLE `mc_coupon_products` (
  `coupon_product_id` int(11) NOT NULL AUTO_INCREMENT,
  `prod_code` int(11) DEFAULT NULL,
  `company_code` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`coupon_product_id`),
  KEY `fk_coupon_products_prod_id` (`prod_code`),
  KEY `fk_coupon_prod_comp_cd_coup_id` (`company_code`,`coupon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_coupon_products`
--

/*!40000 ALTER TABLE `mc_coupon_products` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_coupon_products` ENABLE KEYS */;


--
-- Definition of table `mc_coupon_shipping`
--

DROP TABLE IF EXISTS `mc_coupon_shipping`;
CREATE TABLE `mc_coupon_shipping` (
  `coupon_shipping_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `shipping_method_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`coupon_shipping_id`),
  KEY `fk_coupon_shipping_comp_coupon` (`company_code`,`coupon_id`),
  KEY `fk_coupon_shipping_method_id` (`shipping_method_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_coupon_shipping`
--

/*!40000 ALTER TABLE `mc_coupon_shipping` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_coupon_shipping` ENABLE KEYS */;


--
-- Definition of table `mc_coupon_value`
--

DROP TABLE IF EXISTS `mc_coupon_value`;
CREATE TABLE `mc_coupon_value` (
  `coupon_value_id` int(11) NOT NULL AUTO_INCREMENT,
  `currency_id` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `coupon_value` int(11) DEFAULT NULL,
  `coupon_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`coupon_value_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_coupon_value`
--

/*!40000 ALTER TABLE `mc_coupon_value` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_coupon_value` ENABLE KEYS */;


--
-- Definition of table `mc_coupons`
--

DROP TABLE IF EXISTS `mc_coupons`;
CREATE TABLE `mc_coupons` (
  `coupon_id` int(11) NOT NULL AUTO_INCREMENT,
  `coupon_code` varchar(20) DEFAULT NULL,
  `coupon_desc` varchar(200) DEFAULT NULL,
  `coupon_value_type` varchar(1) DEFAULT NULL,
  `promotion_type` varchar(20) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `min_order_amount` int(11) DEFAULT NULL,
  `max_use` int(11) DEFAULT NULL,
  `cust_max_use` int(11) DEFAULT NULL,
  `is_allow_multi_coupon` int(11) DEFAULT '0',
  `is_expired` int(1) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`coupon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_coupons`
--

/*!40000 ALTER TABLE `mc_coupons` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_coupons` ENABLE KEYS */;


--
-- Definition of table `mc_coupons_used`
--

DROP TABLE IF EXISTS `mc_coupons_used`;
CREATE TABLE `mc_coupons_used` (
  `coupon_used_id` int(11) NOT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `coupon_used` int(11) DEFAULT NULL,
  PRIMARY KEY (`coupon_used_id`),
  KEY `fk_coupon_used_cust_id` (`customer_id`),
  KEY `fk_coupon_used_coupon_id` (`coupon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_coupons_used`
--

/*!40000 ALTER TABLE `mc_coupons_used` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_coupons_used` ENABLE KEYS */;


--
-- Definition of table `mc_currency`
--

DROP TABLE IF EXISTS `mc_currency`;
CREATE TABLE `mc_currency` (
  `currency_id` int(11) NOT NULL,
  `country_name` varchar(40) DEFAULT NULL,
  `currency_name` varchar(50) DEFAULT NULL,
  `currency_abrv` varchar(10) DEFAULT NULL,
  `currency_symbol` varchar(20) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currency_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_currency`
--

/*!40000 ALTER TABLE `mc_currency` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_currency` ENABLE KEYS */;


--
-- Definition of table `mc_cust_cart`
--

DROP TABLE IF EXISTS `mc_cust_cart`;
CREATE TABLE `mc_cust_cart` (
  `cart_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `currency_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `cart_date` date DEFAULT NULL,
  `cart_name` varchar(20) DEFAULT NULL,
  `s_id` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`cart_id`),
  KEY `fk_cust_cart_comp_curr_id` (`company_code`,`currency_id`),
  KEY `fk_cust_cart_comp_cust_id` (`company_code`,`customer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=145 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_cust_cart`
--

/*!40000 ALTER TABLE `mc_cust_cart` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_cust_cart` ENABLE KEYS */;


--
-- Definition of table `mc_cust_cart_detail`
--

DROP TABLE IF EXISTS `mc_cust_cart_detail`;
CREATE TABLE `mc_cust_cart_detail` (
  `ec_cust_cart_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `cart_id` int(11) DEFAULT NULL,
  `sno` int(11) DEFAULT NULL,
  `prod_code` int(11) DEFAULT NULL,
  `prod_qty` int(11) DEFAULT NULL,
  `prod_rate` int(11) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `size_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`ec_cust_cart_detail_id`),
  KEY `fk_cust_cart_detail_prod_code` (`prod_code`),
  KEY `fk_cust_cart_detail_cart_id` (`cart_id`)
) ENGINE=MyISAM AUTO_INCREMENT=263 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_cust_cart_detail`
--

/*!40000 ALTER TABLE `mc_cust_cart_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_cust_cart_detail` ENABLE KEYS */;


--
-- Definition of table `mc_cust_comp_account`
--

DROP TABLE IF EXISTS `mc_cust_comp_account`;
CREATE TABLE `mc_cust_comp_account` (
  `customer_acc_id` int(11) NOT NULL,
  `company_code` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `cust_code` varchar(20) DEFAULT NULL,
  `opening_bal` int(11) DEFAULT NULL,
  `closing_bal` int(11) DEFAULT NULL,
  PRIMARY KEY (`customer_acc_id`),
  KEY `fk_cust_account_comp_cust_id` (`company_code`,`customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_cust_comp_account`
--

/*!40000 ALTER TABLE `mc_cust_comp_account` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_cust_comp_account` ENABLE KEYS */;


--
-- Definition of table `mc_customer_coupns`
--

DROP TABLE IF EXISTS `mc_customer_coupns`;
CREATE TABLE `mc_customer_coupns` (
  `coupon_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`coupon_id`,`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_customer_coupns`
--

/*!40000 ALTER TABLE `mc_customer_coupns` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customer_coupns` ENABLE KEYS */;


--
-- Definition of table `mc_customer_dependent`
--

DROP TABLE IF EXISTS `mc_customer_dependent`;
CREATE TABLE `mc_customer_dependent` (
  `customer_dependent_id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) DEFAULT NULL,
  `customer_id` int(11) NOT NULL,
  `dispaly_seq` int(11) DEFAULT NULL,
  `primary_cust_id` int(11) NOT NULL,
  `relationship_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `last_updated_date` date DEFAULT NULL,
  `last_updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`customer_dependent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customer_dependent`
--

/*!40000 ALTER TABLE `mc_customer_dependent` DISABLE KEYS */;
INSERT INTO `mc_customer_dependent` (`customer_dependent_id`,`created_by`,`customer_id`,`dispaly_seq`,`primary_cust_id`,`relationship_id`,`created_date`,`last_updated_date`,`last_updated_by`) VALUES 
 (1,1,1,1,1,1,'2010-07-13','2010-07-13',1),
 (2,1,1,2,1,1,'2010-07-13','2010-07-13',1),
 (3,1,2,1,1,1,'2010-07-13','2010-07-13',1),
 (4,1,4,1,1,1,'2010-07-13','2010-07-13',1);
/*!40000 ALTER TABLE `mc_customer_dependent` ENABLE KEYS */;


--
-- Definition of table `mc_customer_history`
--

DROP TABLE IF EXISTS `mc_customer_history`;
CREATE TABLE `mc_customer_history` (
  `cust_hist_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) DEFAULT NULL,
  `facility_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `hist_rec_date` date DEFAULT NULL,
  PRIMARY KEY (`cust_hist_id`),
  KEY `cust_hist_facility_id_fk` (`facility_id`),
  KEY `cust_hist_comp_cd_fk` (`company_code`),
  CONSTRAINT `mc_customer_history_ibfk_1` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`),
  CONSTRAINT `mc_customer_history_ibfk_2` FOREIGN KEY (`company_code`) REFERENCES `ec_companies` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customer_history`
--

/*!40000 ALTER TABLE `mc_customer_history` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customer_history` ENABLE KEYS */;


--
-- Definition of table `mc_customer_history_detail`
--

DROP TABLE IF EXISTS `mc_customer_history_detail`;
CREATE TABLE `mc_customer_history_detail` (
  `cust_hist_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `cust_hist_id` int(11) DEFAULT NULL,
  `mc_question_id` int(11) DEFAULT NULL,
  `cust_answer` int(1) DEFAULT NULL,
  `cust_comments` varchar(500) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  PRIMARY KEY (`cust_hist_detail_id`),
  KEY `cust_hist_dtl_question_id_fk` (`mc_question_id`),
  KEY `cust_hist_dtl_cust_hist_id_fk` (`cust_hist_id`),
  CONSTRAINT `mc_customer_history_detail_ibfk_1` FOREIGN KEY (`mc_question_id`) REFERENCES `mc_questions` (`mc_question_id`),
  CONSTRAINT `mc_customer_history_detail_ibfk_2` FOREIGN KEY (`cust_hist_id`) REFERENCES `mc_customer_history` (`cust_hist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customer_history_detail`
--

/*!40000 ALTER TABLE `mc_customer_history_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customer_history_detail` ENABLE KEYS */;


--
-- Definition of table `mc_customer_treatment`
--

DROP TABLE IF EXISTS `mc_customer_treatment`;
CREATE TABLE `mc_customer_treatment` (
  `customer_treatment_id` int(11) NOT NULL AUTO_INCREMENT,
  `specialist_id` int(11) DEFAULT NULL,
  `treatment_date` date DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `comments` varchar(4000) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`customer_treatment_id`),
  KEY `cust_treat_specialist_id_fk` (`specialist_id`),
  CONSTRAINT `mc_customer_treatment_ibfk_1` FOREIGN KEY (`specialist_id`) REFERENCES `mc_specialist` (`specialist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customer_treatment`
--

/*!40000 ALTER TABLE `mc_customer_treatment` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customer_treatment` ENABLE KEYS */;


--
-- Definition of table `mc_customer_treatment_detail`
--

DROP TABLE IF EXISTS `mc_customer_treatment_detail`;
CREATE TABLE `mc_customer_treatment_detail` (
  `customer_treatment_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_treatment_id` int(11) DEFAULT NULL,
  `treatment_id` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  PRIMARY KEY (`customer_treatment_detail_id`),
  KEY `cust_treat_detail_ctreat_id_fk` (`customer_treatment_id`),
  KEY `cust_treat_detail_treat_id_fk` (`treatment_id`),
  CONSTRAINT `mc_customer_treatment_detail_ibfk_1` FOREIGN KEY (`customer_treatment_id`) REFERENCES `mc_customer_treatment` (`customer_treatment_id`),
  CONSTRAINT `mc_customer_treatment_detail_ibfk_2` FOREIGN KEY (`treatment_id`) REFERENCES `mc_treatment` (`treatment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customer_treatment_detail`
--

/*!40000 ALTER TABLE `mc_customer_treatment_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customer_treatment_detail` ENABLE KEYS */;


--
-- Definition of table `mc_customers`
--

DROP TABLE IF EXISTS `mc_customers`;
CREATE TABLE `mc_customers` (
  `customer_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_type` char(3) DEFAULT NULL,
  `cust_code` varchar(20) DEFAULT NULL,
  `title` varchar(3) DEFAULT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `middle_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `gender` varchar(1) DEFAULT NULL,
  `home_phone` varchar(10) DEFAULT NULL,
  `cell_phone` varchar(20) DEFAULT NULL,
  `email_address` varchar(50) DEFAULT NULL,
  `password` varchar(20) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `cust_pin_code` varchar(4) DEFAULT NULL,
  `blog_image_path` varchar(200) DEFAULT NULL,
  `comments` varchar(20) DEFAULT NULL,
  `rec_newsltr` char(3) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`customer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_customers`
--

/*!40000 ALTER TABLE `mc_customers` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_customers` ENABLE KEYS */;


--
-- Definition of table `mc_days`
--

DROP TABLE IF EXISTS `mc_days`;
CREATE TABLE `mc_days` (
  `day_id` int(11) NOT NULL AUTO_INCREMENT,
  `day_display_name` varchar(20) DEFAULT NULL,
  `day_eng_name` varchar(20) DEFAULT NULL,
  `dispaly_seq` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`day_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_days`
--

/*!40000 ALTER TABLE `mc_days` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_days` ENABLE KEYS */;


--
-- Definition of table `mc_distributor`
--

DROP TABLE IF EXISTS `mc_distributor`;
CREATE TABLE `mc_distributor` (
  `distributor_id` int(11) NOT NULL AUTO_INCREMENT,
  `distributor_name` varchar(200) DEFAULT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `street_adress` varchar(50) DEFAULT NULL,
  `city` varchar(20) DEFAULT NULL,
  `state_code` varchar(20) DEFAULT NULL,
  `zip_code` varchar(10) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`distributor_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_distributor`
--

/*!40000 ALTER TABLE `mc_distributor` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_distributor` ENABLE KEYS */;


--
-- Definition of table `mc_domain`
--

DROP TABLE IF EXISTS `mc_domain`;
CREATE TABLE `mc_domain` (
  `domain_id` int(11) NOT NULL AUTO_INCREMENT,
  `domain_name` varchar(150) DEFAULT NULL,
  `email` varchar(50) NOT NULL,
  `first_name` varchar(60) DEFAULT NULL,
  `last_name` varchar(60) DEFAULT NULL,
  `phone_no` varchar(20) DEFAULT NULL,
  `cell_no` varchar(60) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`domain_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_domain`
--

/*!40000 ALTER TABLE `mc_domain` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_domain` ENABLE KEYS */;


--
-- Definition of table `mc_domain_web_templates`
--

DROP TABLE IF EXISTS `mc_domain_web_templates`;
CREATE TABLE `mc_domain_web_templates` (
  `domain_id` int(11) NOT NULL,
  `web_template_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`domain_id`,`web_template_id`),
  UNIQUE KEY `pk_ec_domain_web_templates` (`domain_id`,`web_template_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_domain_web_templates`
--

/*!40000 ALTER TABLE `mc_domain_web_templates` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_domain_web_templates` ENABLE KEYS */;


--
-- Definition of table `mc_facility`
--

DROP TABLE IF EXISTS `mc_facility`;
CREATE TABLE `mc_facility` (
  `facility_id` int(11) NOT NULL,
  `company_code` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `facility_name` varchar(100) DEFAULT NULL,
  `address_line1` varchar(100) DEFAULT NULL,
  `address_line2` varchar(100) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `state` varchar(20) DEFAULT NULL,
  `phone01` varchar(20) DEFAULT NULL,
  `phone02` varchar(20) DEFAULT NULL,
  `email_address` varchar(100) DEFAULT NULL,
  `web_link` varchar(50) DEFAULT NULL,
  `time_zone` varchar(5) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  `created_date` datetime DEFAULT NULL,
  `created_by` varchar(45) DEFAULT NULL,
  `last_updated_date` datetime DEFAULT NULL,
  `last_updated_by` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;

--
-- Dumping data for table `mc_facility`
--

/*!40000 ALTER TABLE `mc_facility` DISABLE KEYS */;
INSERT INTO `mc_facility` (`facility_id`,`company_code`,`display_seq`,`facility_name`,`address_line1`,`address_line2`,`city`,`state`,`phone01`,`phone02`,`email_address`,`web_link`,`time_zone`,`is_active`,`created_date`,`created_by`,`last_updated_date`,`last_updated_by`) VALUES 
 (1,1,1,'Regional Clinic',NULL,NULL,'Austin','TX','512-654-2000',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL),
 (2,1,2,'Private Clinic',NULL,NULL,'Louisville','KY','513-800-2000',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL),
 (3,1,3,'Children Hospital',NULL,NULL,'Toronto','ON','512-800-2000',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `mc_facility` ENABLE KEYS */;


--
-- Definition of table `mc_facility_holiday_calendar`
--

DROP TABLE IF EXISTS `mc_facility_holiday_calendar`;
CREATE TABLE `mc_facility_holiday_calendar` (
  `facility_id` int(11) NOT NULL,
  `calendar_id` int(11) NOT NULL,
  PRIMARY KEY (`facility_id`,`calendar_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_facility_holiday_calendar`
--

/*!40000 ALTER TABLE `mc_facility_holiday_calendar` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_facility_holiday_calendar` ENABLE KEYS */;


--
-- Definition of table `mc_facility_timing`
--

DROP TABLE IF EXISTS `mc_facility_timing`;
CREATE TABLE `mc_facility_timing` (
  `facility_time_id` int(11) NOT NULL,
  `facility_id` int(11) DEFAULT NULL,
  `day_id` int(11) DEFAULT NULL,
  `time_form` varchar(20) DEFAULT NULL,
  `time_to` varchar(20) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `valid_from` date DEFAULT NULL,
  `valid_to` date DEFAULT NULL,
  `comments` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(10) unsigned DEFAULT NULL,
  `last_updated_date` date DEFAULT NULL,
  `last_updated_by` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`facility_time_id`),
  KEY `facility_time_day_id_fk` (`day_id`),
  KEY `facility_timing_facility_id_fk` (`facility_id`),
  CONSTRAINT `mc_facility_timing_ibfk_1` FOREIGN KEY (`day_id`) REFERENCES `mc_days` (`day_id`),
  CONSTRAINT `mc_facility_timing_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_facility_timing`
--

/*!40000 ALTER TABLE `mc_facility_timing` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_facility_timing` ENABLE KEYS */;


--
-- Definition of table `mc_facility_treatment`
--

DROP TABLE IF EXISTS `mc_facility_treatment`;
CREATE TABLE `mc_facility_treatment` (
  `facility_treatment_id` int(11) NOT NULL AUTO_INCREMENT,
  `facility_id` int(11) NOT NULL,
  `treatment_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`facility_treatment_id`),
  KEY `facility_treat_treatment_id_fk` (`treatment_id`),
  KEY `facility_treat_faclity_id_fk` (`facility_id`),
  CONSTRAINT `mc_facility_treatment_ibfk_1` FOREIGN KEY (`treatment_id`) REFERENCES `mc_treatment` (`treatment_id`),
  CONSTRAINT `mc_facility_treatment_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_facility_treatment`
--

/*!40000 ALTER TABLE `mc_facility_treatment` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_facility_treatment` ENABLE KEYS */;


--
-- Definition of table `mc_general_banners`
--

DROP TABLE IF EXISTS `mc_general_banners`;
CREATE TABLE `mc_general_banners` (
  `general_banner_id` int(11) NOT NULL AUTO_INCREMENT,
  `banner_id` int(11) DEFAULT NULL,
  `general_banner_desc` varchar(4000) DEFAULT NULL,
  `banner_image_path` varchar(200) DEFAULT NULL,
  `banner_image_text` varchar(100) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`general_banner_id`),
  UNIQUE KEY `pk_ec_general_banners` (`general_banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_general_banners`
--

/*!40000 ALTER TABLE `mc_general_banners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_general_banners` ENABLE KEYS */;


--
-- Definition of table `mc_gift_card_type`
--

DROP TABLE IF EXISTS `mc_gift_card_type`;
CREATE TABLE `mc_gift_card_type` (
  `gift_card_type_id` int(11) NOT NULL AUTO_INCREMENT,
  `gift_card_name` varchar(100) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`gift_card_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_gift_card_type`
--

/*!40000 ALTER TABLE `mc_gift_card_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_gift_card_type` ENABLE KEYS */;


--
-- Definition of table `mc_gift_cards`
--

DROP TABLE IF EXISTS `mc_gift_cards`;
CREATE TABLE `mc_gift_cards` (
  `gift_card_id` int(11) NOT NULL AUTO_INCREMENT,
  `gift_card_type_id` int(11) DEFAULT NULL,
  `sno` int(11) DEFAULT NULL,
  `special_message` varchar(100) DEFAULT NULL,
  `gift_card_num` varchar(20) DEFAULT NULL,
  `gift_card_pin` varchar(20) DEFAULT NULL,
  `currency_id` int(11) DEFAULT NULL,
  `gift_card_value` int(11) DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  PRIMARY KEY (`gift_card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_gift_cards`
--

/*!40000 ALTER TABLE `mc_gift_cards` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_gift_cards` ENABLE KEYS */;


--
-- Definition of table `mc_group_companies`
--

DROP TABLE IF EXISTS `mc_group_companies`;
CREATE TABLE `mc_group_companies` (
  `group_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  PRIMARY KEY (`group_id`,`company_code`),
  UNIQUE KEY `pk_ec_group_companies` (`group_id`,`company_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_group_companies`
--

/*!40000 ALTER TABLE `mc_group_companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_group_companies` ENABLE KEYS */;


--
-- Definition of table `mc_groups`
--

DROP TABLE IF EXISTS `mc_groups`;
CREATE TABLE `mc_groups` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`group_id`),
  UNIQUE KEY `pk_ec_groups` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_groups`
--

/*!40000 ALTER TABLE `mc_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_groups` ENABLE KEYS */;


--
-- Definition of table `mc_holiday_calendar_detail`
--

DROP TABLE IF EXISTS `mc_holiday_calendar_detail`;
CREATE TABLE `mc_holiday_calendar_detail` (
  `calendar_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `calendar_id` int(11) DEFAULT NULL,
  `calendar_date` char(18) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`calendar_detail_id`),
  KEY `holidat_cal_cale_detail_id_fk` (`calendar_id`),
  CONSTRAINT `mc_holiday_calendar_detail_ibfk_1` FOREIGN KEY (`calendar_id`) REFERENCES `mc_holidays_calendar` (`calendar_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_holiday_calendar_detail`
--

/*!40000 ALTER TABLE `mc_holiday_calendar_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_holiday_calendar_detail` ENABLE KEYS */;


--
-- Definition of table `mc_holidays_calendar`
--

DROP TABLE IF EXISTS `mc_holidays_calendar`;
CREATE TABLE `mc_holidays_calendar` (
  `calendar_id` int(11) NOT NULL AUTO_INCREMENT,
  `clander_name` varchar(40) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`calendar_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_holidays_calendar`
--

/*!40000 ALTER TABLE `mc_holidays_calendar` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_holidays_calendar` ENABLE KEYS */;


--
-- Definition of table `mc_languages`
--

DROP TABLE IF EXISTS `mc_languages`;
CREATE TABLE `mc_languages` (
  `language_id` int(11) NOT NULL AUTO_INCREMENT,
  `language_abrv` varchar(5) DEFAULT NULL,
  `language_name` varchar(100) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`language_id`),
  UNIQUE KEY `pk_ec_languages` (`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_languages`
--

/*!40000 ALTER TABLE `mc_languages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_languages` ENABLE KEYS */;


--
-- Definition of table `mc_locations`
--

DROP TABLE IF EXISTS `mc_locations`;
CREATE TABLE `mc_locations` (
  `location_id` int(11) NOT NULL AUTO_INCREMENT,
  `location_name` varchar(50) DEFAULT NULL,
  `address_line1` varchar(50) DEFAULT NULL,
  `address_line2` varchar(50) DEFAULT NULL,
  `state` varchar(20) DEFAULT NULL,
  `city` varchar(20) DEFAULT NULL,
  `country` varchar(20) DEFAULT NULL,
  `phone_no1` varchar(20) DEFAULT NULL,
  `phone_no2` varchar(20) DEFAULT NULL,
  `fax_no` varchar(20) DEFAULT NULL,
  `email_address` varchar(50) DEFAULT NULL,
  `thumblink_image_path` varchar(200) DEFAULT NULL,
  `large_size_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`location_id`),
  KEY `ec_company_locations_I_1` (`location_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_locations`
--

/*!40000 ALTER TABLE `mc_locations` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_locations` ENABLE KEYS */;


--
-- Definition of table `mc_manufactures`
--

DROP TABLE IF EXISTS `mc_manufactures`;
CREATE TABLE `mc_manufactures` (
  `manufacture_id` int(11) NOT NULL AUTO_INCREMENT,
  `manufacture_name` varchar(100) DEFAULT NULL,
  `manufacture_desc` varchar(20) NOT NULL,
  `street_address` varchar(50) DEFAULT NULL,
  `city` varchar(20) DEFAULT NULL,
  `state_code` varchar(20) DEFAULT NULL,
  `zip_code` varchar(10) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`manufacture_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_manufactures`
--

/*!40000 ALTER TABLE `mc_manufactures` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_manufactures` ENABLE KEYS */;


--
-- Definition of table `mc_order_address`
--

DROP TABLE IF EXISTS `mc_order_address`;
CREATE TABLE `mc_order_address` (
  `order_address_id` int(11) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `address_type` varchar(1) DEFAULT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `middle_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `street_address` varchar(100) DEFAULT NULL,
  `state_code` varchar(20) DEFAULT NULL,
  `zip_code` varchar(20) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `cc_no` varchar(20) DEFAULT NULL,
  `sec_code` varchar(3) DEFAULT NULL,
  `exp_month` varchar(2) DEFAULT NULL,
  `exp_year` varchar(4) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`order_address_id`),
  KEY `fk_order_address_order_id` (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_order_address`
--

/*!40000 ALTER TABLE `mc_order_address` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_order_address` ENABLE KEYS */;


--
-- Definition of table `mc_order_detail`
--

DROP TABLE IF EXISTS `mc_order_detail`;
CREATE TABLE `mc_order_detail` (
  `order_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `prod_code` int(11) DEFAULT NULL,
  `prod_sno` varchar(100) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `rate` int(11) DEFAULT NULL,
  `coupon_code` varchar(20) DEFAULT NULL,
  `coupon_value` int(11) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `admin_comments` varchar(4000) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`order_detail_id`),
  KEY `fk_order_detail_product_code` (`prod_code`),
  KEY `fk_order_detail_order_id` (`order_id`)
) ENGINE=MyISAM AUTO_INCREMENT=111 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_order_detail`
--

/*!40000 ALTER TABLE `mc_order_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_order_detail` ENABLE KEYS */;


--
-- Definition of table `mc_order_status`
--

DROP TABLE IF EXISTS `mc_order_status`;
CREATE TABLE `mc_order_status` (
  `order_status_id` int(11) NOT NULL,
  `order_desc` varchar(20) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`order_status_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_order_status`
--

/*!40000 ALTER TABLE `mc_order_status` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_order_status` ENABLE KEYS */;


--
-- Definition of table `mc_order_status_history`
--

DROP TABLE IF EXISTS `mc_order_status_history`;
CREATE TABLE `mc_order_status_history` (
  `order_status_history_id` int(11) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `order_status_id` int(11) DEFAULT NULL,
  `status_date` date DEFAULT NULL,
  `admin_comments` varchar(20) DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  `last_update_date` date DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`order_status_history_id`),
  KEY `fk_order_status_hist_order_id` (`order_id`),
  KEY `fk_order_status_hist_status_id` (`order_status_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_order_status_history`
--

/*!40000 ALTER TABLE `mc_order_status_history` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_order_status_history` ENABLE KEYS */;


--
-- Definition of table `mc_orders`
--

DROP TABLE IF EXISTS `mc_orders`;
CREATE TABLE `mc_orders` (
  `order_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) DEFAULT NULL,
  `order_num` varchar(20) DEFAULT NULL,
  `order_date` datetime DEFAULT NULL,
  `order_sub_total` int(11) DEFAULT NULL,
  `shipment_amount` int(11) DEFAULT NULL,
  `total_tax_amount` int(11) DEFAULT NULL,
  `order_discount_amount` int(11) DEFAULT NULL,
  `order_total_amount` int(11) DEFAULT NULL,
  `customer_comments` varchar(200) DEFAULT NULL,
  `admin_comments` varchar(200) DEFAULT NULL,
  `is_checked_out` int(1) DEFAULT '0',
  PRIMARY KEY (`order_id`),
  KEY `fk_company_gift_card_id` (`customer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=108 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_orders`
--

/*!40000 ALTER TABLE `mc_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_orders` ENABLE KEYS */;


--
-- Definition of table `mc_page_button_images`
--

DROP TABLE IF EXISTS `mc_page_button_images`;
CREATE TABLE `mc_page_button_images` (
  `button_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `button_image_name` varchar(200) DEFAULT NULL,
  `button_image_path` varchar(200) DEFAULT NULL,
  `button_image_mouseover_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`button_image_id`),
  UNIQUE KEY `pk_ec_page_button_images` (`button_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_page_button_images`
--

/*!40000 ALTER TABLE `mc_page_button_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_page_button_images` ENABLE KEYS */;


--
-- Definition of table `mc_page_group_companies`
--

DROP TABLE IF EXISTS `mc_page_group_companies`;
CREATE TABLE `mc_page_group_companies` (
  `page_name` varchar(200) NOT NULL,
  `group_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`page_name`,`group_id`,`company_code`),
  UNIQUE KEY `pk_ec_page_group_companies` (`page_name`,`group_id`,`company_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_page_group_companies`
--

/*!40000 ALTER TABLE `mc_page_group_companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_page_group_companies` ENABLE KEYS */;


--
-- Definition of table `mc_page_special_effects`
--

DROP TABLE IF EXISTS `mc_page_special_effects`;
CREATE TABLE `mc_page_special_effects` (
  `page_special_effect_id` int(11) NOT NULL AUTO_INCREMENT,
  `page_special_effect_name` varchar(40) DEFAULT NULL,
  `page_special_effect_cmd` varchar(4000) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`page_special_effect_id`),
  UNIQUE KEY `pk_ec_page_special_effects` (`page_special_effect_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_page_special_effects`
--

/*!40000 ALTER TABLE `mc_page_special_effects` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_page_special_effects` ENABLE KEYS */;


--
-- Definition of table `mc_pages`
--

DROP TABLE IF EXISTS `mc_pages`;
CREATE TABLE `mc_pages` (
  `page_id` int(11) NOT NULL AUTO_INCREMENT,
  `button_text` varchar(60) DEFAULT NULL,
  `button_text_color` varchar(60) DEFAULT NULL,
  `button_mouse_over_color` varchar(60) DEFAULT NULL,
  `page_link_path` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`page_id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_pages`
--

/*!40000 ALTER TABLE `mc_pages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_pages` ENABLE KEYS */;


--
-- Definition of table `mc_panel_images`
--

DROP TABLE IF EXISTS `mc_panel_images`;
CREATE TABLE `mc_panel_images` (
  `panel_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `panel_id` int(11) DEFAULT NULL,
  `panel_image_text` varchar(4000) DEFAULT NULL,
  `panel_image_path` varchar(200) DEFAULT NULL,
  `panel_link_path` varchar(200) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`panel_image_id`),
  UNIQUE KEY `pk_ec_panel_images` (`panel_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_panel_images`
--

/*!40000 ALTER TABLE `mc_panel_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_panel_images` ENABLE KEYS */;


--
-- Definition of table `mc_panels`
--

DROP TABLE IF EXISTS `mc_panels`;
CREATE TABLE `mc_panels` (
  `panel_id` int(11) NOT NULL AUTO_INCREMENT,
  `panel_image_name` varchar(20) DEFAULT NULL,
  `panel_image_path` varchar(200) DEFAULT NULL,
  `panel_image_width` varchar(10) DEFAULT NULL,
  `panel_image_height` varchar(10) DEFAULT NULL,
  `ccs_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `html_cmd` varchar(4000) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`panel_id`),
  UNIQUE KEY `pk_ec_panels` (`panel_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_panels`
--

/*!40000 ALTER TABLE `mc_panels` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_panels` ENABLE KEYS */;


--
-- Definition of table `mc_payment_detail`
--

DROP TABLE IF EXISTS `mc_payment_detail`;
CREATE TABLE `mc_payment_detail` (
  `payment_detail_id` int(11) NOT NULL,
  `company_code` int(11) NOT NULL,
  `gift_card_id` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `customer_acc_id` int(11) DEFAULT NULL,
  `payment_method_id` int(11) DEFAULT NULL,
  `order_id` int(11) NOT NULL,
  `payment_seq` int(11) DEFAULT NULL,
  `coupon_value_id` int(11) DEFAULT NULL,
  `payment_value` int(11) DEFAULT NULL,
  `remaining_balance` int(11) DEFAULT NULL,
  PRIMARY KEY (`payment_detail_id`),
  KEY `fk_paymnt_detail_pay_method_id` (`payment_method_id`,`company_code`),
  KEY `fk_paymnt_detail_cust_acc_id` (`customer_acc_id`),
  KEY `fk_paymnt_detail_comp_gift_id` (`company_code`,`gift_card_id`),
  KEY `fk_paymnt_detail_comp_coupn_id` (`company_code`,`coupon_id`),
  KEY `fk_payment_detail_coupon_val_id` (`coupon_value_id`),
  KEY `fk_paymnt_detail_comp_order_id` (`company_code`,`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_payment_detail`
--

/*!40000 ALTER TABLE `mc_payment_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_payment_detail` ENABLE KEYS */;


--
-- Definition of table `mc_payment_methods`
--

DROP TABLE IF EXISTS `mc_payment_methods`;
CREATE TABLE `mc_payment_methods` (
  `payment_method_id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_code` varchar(3) DEFAULT NULL,
  `payment_method_name` varchar(50) DEFAULT NULL,
  `payment_method_desc` varchar(20) DEFAULT NULL,
  `api_cmd` varchar(4000) DEFAULT NULL,
  `payment_method_icon_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`payment_method_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_payment_methods`
--

/*!40000 ALTER TABLE `mc_payment_methods` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_payment_methods` ENABLE KEYS */;


--
-- Definition of table `mc_prod_treatment`
--

DROP TABLE IF EXISTS `mc_prod_treatment`;
CREATE TABLE `mc_prod_treatment` (
  `prod_treatment_id` int(11) NOT NULL AUTO_INCREMENT,
  `prod_code` int(11) NOT NULL,
  `treatment_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`prod_treatment_id`),
  KEY `prod_treat_treatment_id_fk` (`treatment_id`),
  KEY `prod_treat_prod_id_fk` (`prod_code`),
  CONSTRAINT `mc_prod_treatment_ibfk_1` FOREIGN KEY (`treatment_id`) REFERENCES `mc_treatment` (`treatment_id`),
  CONSTRAINT `mc_prod_treatment_ibfk_2` FOREIGN KEY (`prod_code`) REFERENCES `mc_products` (`prod_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_prod_treatment`
--

/*!40000 ALTER TABLE `mc_prod_treatment` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_prod_treatment` ENABLE KEYS */;


--
-- Definition of table `mc_product_categories`
--

DROP TABLE IF EXISTS `mc_product_categories`;
CREATE TABLE `mc_product_categories` (
  `company_code` int(11) NOT NULL,
  `category_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  PRIMARY KEY (`company_code`,`prod_code`),
  KEY `ec_product_categories_FI_2` (`category_code`),
  KEY `ec_product_categories_FI_3` (`prod_code`),
  CONSTRAINT `ec_product_categories_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`),
  CONSTRAINT `ec_product_categories_FK_2` FOREIGN KEY (`category_code`) REFERENCES `mc_categories` (`category_code`),
  CONSTRAINT `ec_product_categories_FK_3` FOREIGN KEY (`prod_code`) REFERENCES `mc_products` (`prod_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_product_categories`
--

/*!40000 ALTER TABLE `mc_product_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_categories` ENABLE KEYS */;


--
-- Definition of table `mc_product_colors`
--

DROP TABLE IF EXISTS `mc_product_colors`;
CREATE TABLE `mc_product_colors` (
  `color_id` int(11) NOT NULL AUTO_INCREMENT,
  `color_desc` varchar(50) DEFAULT NULL,
  `color_code` varchar(20) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`color_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_colors`
--

/*!40000 ALTER TABLE `mc_product_colors` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_colors` ENABLE KEYS */;


--
-- Definition of table `mc_product_details`
--

DROP TABLE IF EXISTS `mc_product_details`;
CREATE TABLE `mc_product_details` (
  `prod_code` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `prod_description` varchar(4000) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `show_as` char(10) DEFAULT 'B',
  PRIMARY KEY (`id`),
  KEY `ec_product_details_FI_1` (`prod_code`),
  CONSTRAINT `ec_product_details_FK_1` FOREIGN KEY (`prod_code`) REFERENCES `mc_products` (`prod_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_product_details`
--

/*!40000 ALTER TABLE `mc_product_details` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_details` ENABLE KEYS */;


--
-- Definition of table `mc_product_distributor`
--

DROP TABLE IF EXISTS `mc_product_distributor`;
CREATE TABLE `mc_product_distributor` (
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `distributor_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`prod_code`,`distributor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_distributor`
--

/*!40000 ALTER TABLE `mc_product_distributor` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_distributor` ENABLE KEYS */;


--
-- Definition of table `mc_product_images`
--

DROP TABLE IF EXISTS `mc_product_images`;
CREATE TABLE `mc_product_images` (
  `prod_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `prod_code` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `prod_thumbnail_path` varchar(200) DEFAULT NULL,
  `prod_large_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`prod_image_id`),
  KEY `fk_prod_images_prod_code` (`prod_code`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_product_images`
--

/*!40000 ALTER TABLE `mc_product_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_images` ENABLE KEYS */;


--
-- Definition of table `mc_product_manufactures`
--

DROP TABLE IF EXISTS `mc_product_manufactures`;
CREATE TABLE `mc_product_manufactures` (
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `manufacture_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`prod_code`,`manufacture_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_manufactures`
--

/*!40000 ALTER TABLE `mc_product_manufactures` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_manufactures` ENABLE KEYS */;


--
-- Definition of table `mc_product_offers`
--

DROP TABLE IF EXISTS `mc_product_offers`;
CREATE TABLE `mc_product_offers` (
  `product_offer_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `offer_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `prod_offer_desc` varchar(4000) DEFAULT NULL,
  `prod_list_price` int(11) DEFAULT NULL,
  `prod_offer_rate` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT '0',
  PRIMARY KEY (`product_offer_id`),
  KEY `ec_product_offers_I_1` (`prod_code`),
  KEY `ec_product_offers_FI_2` (`offer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_product_offers`
--

/*!40000 ALTER TABLE `mc_product_offers` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_offers` ENABLE KEYS */;


--
-- Definition of table `mc_product_prices`
--

DROP TABLE IF EXISTS `mc_product_prices`;
CREATE TABLE `mc_product_prices` (
  `product_price_id` int(11) NOT NULL AUTO_INCREMENT,
  `size_id` int(11) DEFAULT NULL,
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `quality_id` int(11) DEFAULT NULL,
  `currency_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `wholesale_price` int(11) DEFAULT NULL,
  `retail_price` int(11) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`product_price_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_prices`
--

/*!40000 ALTER TABLE `mc_product_prices` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_prices` ENABLE KEYS */;


--
-- Definition of table `mc_product_quality`
--

DROP TABLE IF EXISTS `mc_product_quality`;
CREATE TABLE `mc_product_quality` (
  `product_quality_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `quality_id` int(11) NOT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`product_quality_id`,`company_code`,`prod_code`,`quality_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_quality`
--

/*!40000 ALTER TABLE `mc_product_quality` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_quality` ENABLE KEYS */;


--
-- Definition of table `mc_product_size`
--

DROP TABLE IF EXISTS `mc_product_size`;
CREATE TABLE `mc_product_size` (
  `company_code` int(11) NOT NULL,
  `prod_code` int(11) NOT NULL,
  `size_id` int(11) NOT NULL,
  `prod_sku` varchar(30) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `weight` int(11) DEFAULT NULL,
  `weight_type` varchar(3) DEFAULT NULL,
  `p_length` int(11) DEFAULT NULL,
  `width` int(11) DEFAULT NULL,
  `height` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT '0',
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`company_code`,`prod_code`,`size_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_product_size`
--

/*!40000 ALTER TABLE `mc_product_size` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_size` ENABLE KEYS */;


--
-- Definition of table `mc_product_type`
--

DROP TABLE IF EXISTS `mc_product_type`;
CREATE TABLE `mc_product_type` (
  `prod_type_id` int(11) NOT NULL AUTO_INCREMENT,
  `prod_type_name` varchar(40) DEFAULT NULL,
  `prod_type_desc` varchar(4000) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`prod_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_product_type`
--

/*!40000 ALTER TABLE `mc_product_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_product_type` ENABLE KEYS */;


--
-- Definition of table `mc_products`
--

DROP TABLE IF EXISTS `mc_products`;
CREATE TABLE `mc_products` (
  `prod_code` int(11) NOT NULL AUTO_INCREMENT,
  `prod_name` varchar(50) NOT NULL,
  `prod_sku` varchar(30) DEFAULT NULL,
  `prod_short_name` varchar(20) DEFAULT NULL,
  `prod_short_desc` varchar(1000) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `prod_price` int(11) DEFAULT NULL,
  `show_on_front` int(1) unsigned zerofill DEFAULT NULL,
  `is_new_prod` int(11) DEFAULT '1',
  `prod_thumbnail_path` varchar(200) DEFAULT NULL,
  `prod_large_image_path` varchar(200) DEFAULT NULL,
  `current_qty` int(11) DEFAULT NULL,
  `reorder_level` int(11) DEFAULT NULL,
  `special_message` varchar(200) DEFAULT NULL,
  `weight` int(11) DEFAULT NULL,
  `weight_type` varchar(3) DEFAULT NULL,
  `length` int(11) DEFAULT NULL,
  `wide` int(11) DEFAULT NULL,
  `height` int(11) DEFAULT NULL,
  `is_backorder_allow` int(1) DEFAULT NULL,
  `is_free_item` int(1) DEFAULT NULL,
  `is_downloadable` int(1) DEFAULT '0',
  `downloadable_link` varchar(200) DEFAULT NULL,
  `is_multi_color` int(1) NOT NULL DEFAULT '0',
  `is_multi_size` int(1) DEFAULT '0',
  `is_multi_price` int(1) DEFAULT '0',
  `is_shippable` int(1) DEFAULT '0',
  `is_taxable` int(1) DEFAULT '0',
  `special_condition` varchar(30) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  PRIMARY KEY (`prod_code`),
  KEY `ec_products_I_1` (`prod_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_products`
--

/*!40000 ALTER TABLE `mc_products` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_products` ENABLE KEYS */;


--
-- Definition of table `mc_quality`
--

DROP TABLE IF EXISTS `mc_quality`;
CREATE TABLE `mc_quality` (
  `quality_id` int(11) NOT NULL,
  `quality_code` varchar(10) DEFAULT NULL,
  `quality_name` varchar(50) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`quality_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_quality`
--

/*!40000 ALTER TABLE `mc_quality` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_quality` ENABLE KEYS */;


--
-- Definition of table `mc_question_category`
--

DROP TABLE IF EXISTS `mc_question_category`;
CREATE TABLE `mc_question_category` (
  `question_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_category_name` varchar(50) DEFAULT NULL,
  `question_category_desc` varchar(4000) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `parent_category_id` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`question_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_question_category`
--

/*!40000 ALTER TABLE `mc_question_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_question_category` ENABLE KEYS */;


--
-- Definition of table `mc_questions`
--

DROP TABLE IF EXISTS `mc_questions`;
CREATE TABLE `mc_questions` (
  `mc_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_category_id` int(11) DEFAULT NULL,
  `question_num` varchar(5) DEFAULT NULL,
  `question_desc` varchar(400) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`mc_question_id`),
  KEY `question_quest_cat_id_fk` (`question_category_id`),
  CONSTRAINT `mc_questions_ibfk_1` FOREIGN KEY (`question_category_id`) REFERENCES `mc_question_category` (`question_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_questions`
--

/*!40000 ALTER TABLE `mc_questions` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_questions` ENABLE KEYS */;


--
-- Definition of table `mc_rate_conversion`
--

DROP TABLE IF EXISTS `mc_rate_conversion`;
CREATE TABLE `mc_rate_conversion` (
  `rate_conversion_id` int(11) NOT NULL AUTO_INCREMENT,
  `currency_from` int(11) DEFAULT NULL,
  `conversion_date` date DEFAULT NULL,
  PRIMARY KEY (`rate_conversion_id`),
  KEY `fk_rate_conversion_curr_id` (`currency_from`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_rate_conversion`
--

/*!40000 ALTER TABLE `mc_rate_conversion` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_rate_conversion` ENABLE KEYS */;


--
-- Definition of table `mc_rate_conversion_detail`
--

DROP TABLE IF EXISTS `mc_rate_conversion_detail`;
CREATE TABLE `mc_rate_conversion_detail` (
  `rate_conversion_detail_id` int(11) NOT NULL AUTO_INCREMENT,
  `currency_to` int(11) DEFAULT NULL,
  `rate_conversion_id` int(11) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`rate_conversion_detail_id`),
  KEY `fk_rate_conversion_dtl_curr_id` (`currency_to`),
  KEY `fk_rate_conversion_id` (`rate_conversion_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_rate_conversion_detail`
--

/*!40000 ALTER TABLE `mc_rate_conversion_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_rate_conversion_detail` ENABLE KEYS */;


--
-- Definition of table `mc_relationship`
--

DROP TABLE IF EXISTS `mc_relationship`;
CREATE TABLE `mc_relationship` (
  `relationship_id` int(11) NOT NULL AUTO_INCREMENT,
  `relationship_name` varchar(40) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`relationship_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_relationship`
--

/*!40000 ALTER TABLE `mc_relationship` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_relationship` ENABLE KEYS */;


--
-- Definition of table `mc_scheduler`
--

DROP TABLE IF EXISTS `mc_scheduler`;
CREATE TABLE `mc_scheduler` (
  `scheduler_id` int(11) NOT NULL AUTO_INCREMENT,
  `specialist_id` int(11) DEFAULT NULL,
  `facility_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `scheduler_date` date DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `admin_comments` varchar(4000) DEFAULT NULL,
  `cust_comments` varchar(4000) DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`scheduler_id`),
  KEY `scheduler_specialist_fk` (`specialist_id`),
  KEY `scheduler_facility_id_fk` (`facility_id`),
  CONSTRAINT `mc_scheduler_ibfk_1` FOREIGN KEY (`specialist_id`) REFERENCES `mc_specialist` (`specialist_id`),
  CONSTRAINT `mc_scheduler_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_scheduler`
--

/*!40000 ALTER TABLE `mc_scheduler` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_scheduler` ENABLE KEYS */;


--
-- Definition of table `mc_search_images`
--

DROP TABLE IF EXISTS `mc_search_images`;
CREATE TABLE `mc_search_images` (
  `search_image_id` int(11) NOT NULL AUTO_INCREMENT,
  `search_image_desc` varchar(20) DEFAULT NULL,
  `search_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`search_image_id`),
  UNIQUE KEY `pk_ec_search_images` (`search_image_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_search_images`
--

/*!40000 ALTER TABLE `mc_search_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_search_images` ENABLE KEYS */;


--
-- Definition of table `mc_section_style`
--

DROP TABLE IF EXISTS `mc_section_style`;
CREATE TABLE `mc_section_style` (
  `section_style_id` int(11) NOT NULL AUTO_INCREMENT,
  `section_style_name` varchar(20) DEFAULT NULL,
  `section_style_abrv` varchar(10) DEFAULT NULL,
  `css_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `html_cmd` varchar(4000) DEFAULT NULL,
  `amination_delay` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`section_style_id`),
  UNIQUE KEY `pk_ec_section_style` (`section_style_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_section_style`
--

/*!40000 ALTER TABLE `mc_section_style` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_section_style` ENABLE KEYS */;


--
-- Definition of table `mc_setup`
--

DROP TABLE IF EXISTS `mc_setup`;
CREATE TABLE `mc_setup` (
  `company_code` int(11) NOT NULL,
  `max_product_in_row` int(1) DEFAULT '3',
  `is_product_catelog` int(11) NOT NULL DEFAULT '0',
  `is_product_management` int(11) NOT NULL DEFAULT '0',
  `is_product_search` int(11) NOT NULL DEFAULT '0',
  `is_special_offer` int(11) NOT NULL DEFAULT '0',
  `is_join_list` int(11) NOT NULL DEFAULT '0',
  `is_email_notification` int(11) NOT NULL DEFAULT '0',
  `is_shopping_cart` int(11) NOT NULL DEFAULT '0',
  `is_order_management` int(11) NOT NULL DEFAULT '0',
  `is_order_tracking` int(11) NOT NULL DEFAULT '0',
  `is_customer_management` int(11) NOT NULL DEFAULT '0',
  `is_epayment_gateway` int(11) NOT NULL DEFAULT '0',
  `is_category_image_display` int(11) NOT NULL DEFAULT '0',
  `max_category_level` int(11) NOT NULL DEFAULT '0',
  `max_product_level` int(11) NOT NULL DEFAULT '0',
  `max_product_on_page` int(11) DEFAULT '0',
  `max_menu_button` int(11) NOT NULL DEFAULT '6',
  `is_new_product` int(11) NOT NULL DEFAULT '0',
  `is_product_price` int(1) DEFAULT NULL,
  `is_prod_quality_option` int(1) DEFAULT '0',
  `is_multi_dimension` int(1) DEFAULT '0',
  `image_intervel` int(11) NOT NULL DEFAULT '0',
  `yt_user` varchar(30) NOT NULL,
  `is_additional_prod_info` int(1) DEFAULT '0',
  `is_prod_multi_image` int(1) DEFAULT '0',
  `is_wishlist` int(1) DEFAULT '0',
  `is_multi_lang` int(1) DEFAULT '0',
  `base_currency_id` int(11) DEFAULT NULL,
  `is_mutli_packing` int(1) DEFAULT NULL,
  `is_prod_multi_price` int(1) NOT NULL DEFAULT '0',
  `is_multi_currency` int(1) DEFAULT '0',
  `is_prod_bundling` int(1) DEFAULT NULL,
  `default_comp_images_path` varchar(200) DEFAULT NULL,
  `default_prod_images_path` varchar(200) DEFAULT NULL,
  `default_offer_images_path` varchar(200) DEFAULT NULL,
  `default_banner_images_path` varchar(200) DEFAULT NULL,
  `default_other_images_path` varchar(200) DEFAULT NULL,
  `default_js_file_path` varchar(200) DEFAULT NULL,
  `default_xml_file_path` varchar(200) DEFAULT NULL,
  `default_css_file_path` varchar(200) DEFAULT NULL,
  `is_active` int(11) DEFAULT '1',
  `is_discount_coupons` int(1) DEFAULT NULL,
  `is_gift_card_option` int(1) DEFAULT NULL,
  `is_product_multi_image` int(1) DEFAULT NULL,
  `category_images_diaply` int(1) DEFAULT '0',
  `company_abrv` char(5) DEFAULT NULL,
  PRIMARY KEY (`company_code`),
  CONSTRAINT `ec_setup_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_setup`
--

/*!40000 ALTER TABLE `mc_setup` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_setup` ENABLE KEYS */;


--
-- Definition of table `mc_shipping_info`
--

DROP TABLE IF EXISTS `mc_shipping_info`;
CREATE TABLE `mc_shipping_info` (
  `shipping_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) DEFAULT NULL,
  `sno` int(11) DEFAULT NULL,
  `title` varchar(4) DEFAULT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `middle_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `street_address` varchar(50) DEFAULT NULL,
  `city` varchar(20) DEFAULT NULL,
  `state_code` varchar(20) DEFAULT NULL,
  `zip_code` varchar(10) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`shipping_info_id`),
  KEY `fk_ec_shipping_info_cust_id` (`customer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=78 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_shipping_info`
--

/*!40000 ALTER TABLE `mc_shipping_info` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_shipping_info` ENABLE KEYS */;


--
-- Definition of table `mc_shipping_methods`
--

DROP TABLE IF EXISTS `mc_shipping_methods`;
CREATE TABLE `mc_shipping_methods` (
  `shipping_method_id` int(11) NOT NULL AUTO_INCREMENT,
  `shipping_method_name` varchar(50) DEFAULT NULL,
  `shipping_method_desc` varchar(100) DEFAULT NULL,
  `shipping_method_icon_path` varchar(200) DEFAULT NULL,
  `shipping_method_api` varchar(20) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`shipping_method_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mc_shipping_methods`
--

/*!40000 ALTER TABLE `mc_shipping_methods` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_shipping_methods` ENABLE KEYS */;


--
-- Definition of table `mc_sizes`
--

DROP TABLE IF EXISTS `mc_sizes`;
CREATE TABLE `mc_sizes` (
  `size_id` int(11) NOT NULL,
  `size_code` varchar(20) DEFAULT NULL,
  `size_desc` varchar(100) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`size_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_sizes`
--

/*!40000 ALTER TABLE `mc_sizes` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_sizes` ENABLE KEYS */;


--
-- Definition of table `mc_special_offers`
--

DROP TABLE IF EXISTS `mc_special_offers`;
CREATE TABLE `mc_special_offers` (
  `offer_id` int(11) NOT NULL AUTO_INCREMENT,
  `offer_name` varchar(30) DEFAULT NULL,
  `offer_desc` varchar(4000) DEFAULT NULL,
  `offer_start_date` varchar(30) DEFAULT NULL,
  `offer_end_date` varchar(30) DEFAULT NULL,
  `offer_link` varchar(200) DEFAULT NULL,
  `offer_image_path` varchar(200) DEFAULT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`offer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_special_offers`
--

/*!40000 ALTER TABLE `mc_special_offers` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_special_offers` ENABLE KEYS */;


--
-- Definition of table `mc_specialist`
--

DROP TABLE IF EXISTS `mc_specialist`;
CREATE TABLE `mc_specialist` (
  `specialist_id` int(11) NOT NULL AUTO_INCREMENT,
  `first_name` varchar(20) DEFAULT NULL,
  `middle_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `degree_line1` varchar(100) DEFAULT NULL,
  `degree_line2` varchar(100) DEFAULT NULL,
  `office_phone` varchar(20) DEFAULT NULL,
  `home_phone` varchar(20) DEFAULT NULL,
  `cell_phone` varchar(20) DEFAULT NULL,
  `email_adderess` varchar(100) DEFAULT NULL,
  `specialist_picture_path` varchar(200) DEFAULT NULL,
  `is_picture_display` int(1) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `admin_comments` varchar(400) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`specialist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_specialist`
--

/*!40000 ALTER TABLE `mc_specialist` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_specialist` ENABLE KEYS */;


--
-- Definition of table `mc_specialist_facility`
--

DROP TABLE IF EXISTS `mc_specialist_facility`;
CREATE TABLE `mc_specialist_facility` (
  `speclialist_facility_id` int(11) NOT NULL AUTO_INCREMENT,
  `specialist_id` int(11) NOT NULL,
  `facility_id` int(11) NOT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`speclialist_facility_id`),
  KEY `spec_facility_specialist_fk` (`specialist_id`),
  KEY `spec_facility_facility_id_fk` (`facility_id`),
  CONSTRAINT `mc_specialist_facility_ibfk_1` FOREIGN KEY (`specialist_id`) REFERENCES `mc_specialist` (`specialist_id`),
  CONSTRAINT `mc_specialist_facility_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_specialist_facility`
--

/*!40000 ALTER TABLE `mc_specialist_facility` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_specialist_facility` ENABLE KEYS */;


--
-- Definition of table `mc_specialist_timing`
--

DROP TABLE IF EXISTS `mc_specialist_timing`;
CREATE TABLE `mc_specialist_timing` (
  `clinic_time_id` int(11) NOT NULL AUTO_INCREMENT,
  `specialist_id` int(11) DEFAULT NULL,
  `facility_id` int(11) DEFAULT NULL,
  `specialist_days` varchar(20) DEFAULT NULL,
  `time_form` varchar(20) DEFAULT NULL,
  `time_to` varchar(20) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `valid_from` date DEFAULT NULL,
  `valid_to` date DEFAULT NULL,
  `comments` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`clinic_time_id`),
  KEY `specialist_tim_facility_fk` (`facility_id`),
  KEY `specialist_tim_specialist_fk` (`specialist_id`),
  CONSTRAINT `mc_specialist_timing_ibfk_1` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`),
  CONSTRAINT `mc_specialist_timing_ibfk_2` FOREIGN KEY (`specialist_id`) REFERENCES `mc_specialist` (`specialist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_specialist_timing`
--

/*!40000 ALTER TABLE `mc_specialist_timing` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_specialist_timing` ENABLE KEYS */;


--
-- Definition of table `mc_specialist_treatment`
--

DROP TABLE IF EXISTS `mc_specialist_treatment`;
CREATE TABLE `mc_specialist_treatment` (
  `specialist_treatment_id` int(11) NOT NULL AUTO_INCREMENT,
  `facility_id` int(11) DEFAULT NULL,
  `specialist_id` int(11) DEFAULT NULL,
  `treatment_id` int(11) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL,
  `comments` varchar(400) DEFAULT NULL,
  `service_rate` decimal(10,0) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`specialist_treatment_id`),
  KEY `speciallist_treat_faclty_id_fk` (`facility_id`),
  KEY `speciallist_treat_treat_id_fk` (`treatment_id`),
  KEY `speciallist_treat_spec_id_fk` (`specialist_id`),
  CONSTRAINT `mc_specialist_treatment_ibfk_1` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`),
  CONSTRAINT `mc_specialist_treatment_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `mc_facility` (`facility_id`),
  CONSTRAINT `mc_specialist_treatment_ibfk_3` FOREIGN KEY (`treatment_id`) REFERENCES `mc_treatment` (`treatment_id`),
  CONSTRAINT `mc_specialist_treatment_ibfk_4` FOREIGN KEY (`specialist_id`) REFERENCES `mc_specialist` (`specialist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_specialist_treatment`
--

/*!40000 ALTER TABLE `mc_specialist_treatment` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_specialist_treatment` ENABLE KEYS */;


--
-- Definition of table `mc_template_category`
--

DROP TABLE IF EXISTS `mc_template_category`;
CREATE TABLE `mc_template_category` (
  `template_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `template_category_name` varchar(40) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`template_category_id`),
  UNIQUE KEY `pk_ec_template_category` (`template_category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_template_category`
--

/*!40000 ALTER TABLE `mc_template_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_template_category` ENABLE KEYS */;


--
-- Definition of table `mc_template_languages`
--

DROP TABLE IF EXISTS `mc_template_languages`;
CREATE TABLE `mc_template_languages` (
  `web_template_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL,
  PRIMARY KEY (`web_template_id`,`language_id`),
  UNIQUE KEY `pk_ec_template_languages` (`web_template_id`,`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_template_languages`
--

/*!40000 ALTER TABLE `mc_template_languages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_template_languages` ENABLE KEYS */;


--
-- Definition of table `mc_template_search_option_link`
--

DROP TABLE IF EXISTS `mc_template_search_option_link`;
CREATE TABLE `mc_template_search_option_link` (
  `search_option_link_id` int(11) NOT NULL AUTO_INCREMENT,
  `domain_id` int(11) DEFAULT NULL,
  `web_template_id` int(11) DEFAULT NULL,
  `search_option_text` varchar(40) DEFAULT NULL,
  `search_option_link` varchar(200) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`search_option_link_id`),
  UNIQUE KEY `pk_ec_template_search_option_l` (`search_option_link_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_template_search_option_link`
--

/*!40000 ALTER TABLE `mc_template_search_option_link` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_template_search_option_link` ENABLE KEYS */;


--
-- Definition of table `mc_treatment`
--

DROP TABLE IF EXISTS `mc_treatment`;
CREATE TABLE `mc_treatment` (
  `treatment_id` int(11) NOT NULL AUTO_INCREMENT,
  `treatment_name` varchar(50) DEFAULT NULL,
  `treatment_desc` varchar(4000) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL,
  `service_rate` decimal(10,0) DEFAULT NULL,
  `is_active` int(1) DEFAULT NULL,
  PRIMARY KEY (`treatment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_treatment`
--

/*!40000 ALTER TABLE `mc_treatment` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_treatment` ENABLE KEYS */;


--
-- Definition of table `mc_user_privileges`
--

DROP TABLE IF EXISTS `mc_user_privileges`;
CREATE TABLE `mc_user_privileges` (
  `company_code` int(11) NOT NULL,
  `login_id` varchar(30) NOT NULL,
  `web_option_id` int(11) NOT NULL,
  `add_alow` int(11) DEFAULT '1',
  `update_alow` int(11) DEFAULT '1',
  `delete_alow` int(11) DEFAULT '1',
  PRIMARY KEY (`company_code`,`login_id`,`web_option_id`),
  KEY `ec_user_privileges_FI_2` (`login_id`),
  KEY `ec_user_privileges_FI_3` (`web_option_id`),
  CONSTRAINT `ec_user_privileges_FK_1` FOREIGN KEY (`company_code`) REFERENCES `mc_companies` (`company_code`),
  CONSTRAINT `ec_user_privileges_FK_2` FOREIGN KEY (`login_id`) REFERENCES `mc_users` (`login_id`),
  CONSTRAINT `ec_user_privileges_FK_3` FOREIGN KEY (`web_option_id`) REFERENCES `mc_web_options` (`web_option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_user_privileges`
--

/*!40000 ALTER TABLE `mc_user_privileges` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_user_privileges` ENABLE KEYS */;


--
-- Definition of table `mc_users`
--

DROP TABLE IF EXISTS `mc_users`;
CREATE TABLE `mc_users` (
  `login_id` varchar(30) NOT NULL,
  `user_password` varchar(30) NOT NULL,
  `first_name` varchar(20) DEFAULT NULL,
  `last_name` varchar(20) DEFAULT NULL,
  `email_address` varchar(50) DEFAULT NULL,
  `phone_no` varchar(20) DEFAULT NULL,
  `cell_no` varchar(20) DEFAULT NULL,
  `is_admin` tinyint(1) NOT NULL,
  `is_active` int(11) DEFAULT NULL,
  `forgotten_password` varchar(30) NOT NULL,
  PRIMARY KEY (`login_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_users`
--

/*!40000 ALTER TABLE `mc_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_users` ENABLE KEYS */;


--
-- Definition of table `mc_vertical_banners`
--

DROP TABLE IF EXISTS `mc_vertical_banners`;
CREATE TABLE `mc_vertical_banners` (
  `vertical_banner_id` int(11) NOT NULL AUTO_INCREMENT,
  `web_template_id` int(11) DEFAULT NULL,
  `top_bar_image_height` varchar(10) DEFAULT NULL,
  `top_bar_image_width` int(11) DEFAULT NULL,
  `padding_top` int(11) DEFAULT NULL,
  `padding_left` int(11) DEFAULT NULL,
  `top_bar_image_id` int(11) DEFAULT NULL,
  `banner_top_corner_heading` varchar(20) DEFAULT NULL,
  `bottom_bar_image_id` int(11) DEFAULT NULL,
  `bottom_bar_image_height` char(18) DEFAULT NULL,
  `bottom_bar_image_width` int(11) DEFAULT NULL,
  `css_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `banner_id` int(11) DEFAULT NULL,
  `banner_animation_delay` varchar(10) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`vertical_banner_id`),
  UNIQUE KEY `pk_ec_vertical_banners` (`vertical_banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_vertical_banners`
--

/*!40000 ALTER TABLE `mc_vertical_banners` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_vertical_banners` ENABLE KEYS */;


--
-- Definition of table `mc_web_options`
--

DROP TABLE IF EXISTS `mc_web_options`;
CREATE TABLE `mc_web_options` (
  `web_option_id` int(11) NOT NULL AUTO_INCREMENT,
  `web_option_name` varchar(30) DEFAULT NULL,
  `web_thumbnail_path` varchar(200) NOT NULL,
  `web_file_path` varchar(100) NOT NULL,
  `display_seq` int(4) NOT NULL,
  `parent_web_option_id` int(4) NOT NULL,
  `is_active` int(11) DEFAULT NULL,
  PRIMARY KEY (`web_option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_web_options`
--

/*!40000 ALTER TABLE `mc_web_options` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_web_options` ENABLE KEYS */;


--
-- Definition of table `mc_web_template_button_images`
--

DROP TABLE IF EXISTS `mc_web_template_button_images`;
CREATE TABLE `mc_web_template_button_images` (
  `template_section_id` int(11) NOT NULL,
  `button_image_id` int(11) NOT NULL,
  `button_text` varchar(20) DEFAULT NULL,
  `display_seq` int(11) DEFAULT NULL,
  `page_link_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`template_section_id`,`button_image_id`),
  UNIQUE KEY `pk_ec_web_template_button_imag` (`template_section_id`,`button_image_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_web_template_button_images`
--

/*!40000 ALTER TABLE `mc_web_template_button_images` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_web_template_button_images` ENABLE KEYS */;


--
-- Definition of table `mc_web_templates`
--

DROP TABLE IF EXISTS `mc_web_templates`;
CREATE TABLE `mc_web_templates` (
  `web_template_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_template_id` int(11) DEFAULT NULL,
  `web_template_name` varchar(100) DEFAULT NULL,
  `web_template_abrv` varchar(10) DEFAULT NULL,
  `web_template_width` int(11) DEFAULT NULL,
  `web_template_height` int(11) DEFAULT NULL,
  `css_file_path` varchar(200) DEFAULT NULL,
  `js_file_path` varchar(200) DEFAULT NULL,
  `favicon` varchar(200) DEFAULT NULL,
  `explore_title_message` varchar(200) DEFAULT NULL,
  `explore_footer_message` varchar(200) DEFAULT NULL,
  `template_category_id` int(11) DEFAULT NULL,
  `web_template_type` int(1) DEFAULT NULL,
  `background_image_id` int(11) DEFAULT NULL,
  `background_image_style` varchar(20) DEFAULT NULL,
  `background_color` varchar(20) DEFAULT NULL,
  `bg_music_id` int(11) DEFAULT NULL,
  `bg_music_style` varchar(10) DEFAULT NULL,
  `body_bg_color` varchar(20) DEFAULT NULL,
  `page_special_effect_id` int(11) DEFAULT NULL,
  `catelog_location` varchar(1) DEFAULT NULL,
  `catelog_main_heading` varchar(20) DEFAULT NULL,
  `catelog_sub_heading` varchar(40) DEFAULT NULL,
  `catelog_text_color` varchar(10) DEFAULT NULL,
  `catelog_mouseover_color` varchar(10) DEFAULT NULL,
  `catalog_bullet_id` int(11) DEFAULT NULL,
  `catalog_mouseover_bullet_id` int(11) DEFAULT NULL,
  `vertical_banner_location` varchar(2) DEFAULT NULL,
  `header_border_image_id` int(11) DEFAULT NULL,
  `header_border_height` varchar(10) DEFAULT NULL,
  `header_border_width` varchar(10) DEFAULT NULL,
  `header_border_style` varchar(20) DEFAULT NULL,
  `footer_border_image_id` int(11) DEFAULT NULL,
  `footer_border_heigth` varchar(10) DEFAULT NULL,
  `footer_border_width` varchar(10) DEFAULT NULL,
  `footer_border_style` varchar(20) DEFAULT NULL,
  `left_border_image_id` int(11) DEFAULT NULL,
  `left_border_height` varchar(10) DEFAULT NULL,
  `left_border_width` varchar(10) DEFAULT NULL,
  `left_border_style` varchar(20) DEFAULT NULL,
  `right_border_image_id` int(11) DEFAULT NULL,
  `right_border_height` varchar(10) DEFAULT NULL,
  `right_border_width` varchar(10) DEFAULT NULL,
  `right_border_style` varchar(20) DEFAULT NULL,
  `search_bg_image_id` int(11) DEFAULT NULL,
  `search_bg_image_width` varchar(10) DEFAULT NULL,
  `search_bg_image_height` varchar(10) DEFAULT NULL,
  `search_bg_color` varchar(10) DEFAULT NULL,
  `right_top_bar_heading` varchar(40) DEFAULT NULL,
  `right_top_bar_image_id` int(11) DEFAULT NULL,
  `right_top_bar_image_height` varchar(10) DEFAULT NULL,
  `right_top_bar_image_width` varchar(10) DEFAULT NULL,
  `right_corner_bg_color` varchar(20) DEFAULT NULL,
  `right_bottom_bar_image_id` int(11) DEFAULT NULL,
  `right_bottom_bar_image_height` varchar(10) DEFAULT NULL,
  `right_bottom_bar_image_width` varchar(10) DEFAULT NULL,
  `left_top_bar_heading` varchar(40) DEFAULT NULL,
  `left_top_bar_image_id` int(11) DEFAULT NULL,
  `left_top_bar_height` varchar(10) DEFAULT NULL,
  `left_top_bar_width` varchar(10) DEFAULT NULL,
  `left_corner_bg_color` varchar(20) DEFAULT NULL,
  `left_bottom_bar_image_id` int(11) DEFAULT NULL,
  `left_bottom_bar_image_height` varchar(10) DEFAULT NULL,
  `left_bottom_bar_image_width` varchar(10) DEFAULT NULL,
  `company_welcome_note` varchar(4000) DEFAULT NULL,
  `company_welcome_note_height` varchar(10) DEFAULT NULL,
  `company_welcome_note_width` varchar(10) DEFAULT NULL,
  `home_left_image_path` varchar(200) DEFAULT NULL,
  `home_left_image_redirect_link` varchar(200) DEFAULT NULL,
  `home_right_image_path` varchar(200) DEFAULT NULL,
  `home_right_image_redirect_link` varchar(200) DEFAULT NULL,
  `vedio_link_path` varchar(200) DEFAULT NULL,
  `redirect_link_path` varchar(200) DEFAULT NULL,
  `is_active` int(1) DEFAULT '1',
  PRIMARY KEY (`web_template_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mc_web_templates`
--

/*!40000 ALTER TABLE `mc_web_templates` DISABLE KEYS */;
/*!40000 ALTER TABLE `mc_web_templates` ENABLE KEYS */;


--
-- Definition of table `test_table`
--

DROP TABLE IF EXISTS `test_table`;
CREATE TABLE `test_table` (
  `time_zone` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `test_table`
--

/*!40000 ALTER TABLE `test_table` DISABLE KEYS */;
INSERT INTO `test_table` (`time_zone`,`id`) VALUES 
 ('2010-08-17 21:56:17',1),
 ('2010-08-17 22:04:07',1);
/*!40000 ALTER TABLE `test_table` ENABLE KEYS */;


--
-- Definition of function `fnc_dsql_factory`
--

DROP FUNCTION IF EXISTS `fnc_dsql_factory`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `fnc_dsql_factory`(p_comp_cd int,
			     p_language_id int,
			     p_table_name VARCHAR(30)
			    ) RETURNS varchar(4000) CHARSET latin1
BEGIN

    DECLARE done   INT          DEFAULT 0;
		DECLARE v_col  VARCHAR(30)  DEFAULT ' ';
		DECLARE v_head VARCHAR(100) DEFAULT ' ';
		DECLARE stmt_text VARCHAR(4000) DEFAULT ' ';
		DECLARE no_data_found BOOLEAN;
    DECLARE v_count int DEFAULT 0;
    DECLARE v_total_rec int DEFAULT 0;
    DECLARE v_coma VARCHAR(2);
    DECLARE l_last_row INT DEFAULT 0;
    DECLARE v_select VARCHAR(25) DEFAULT 'SELECT ';
    DECLARE v_from    VARCHAR(15) DEFAULT 'FROM  ';
    DECLARE v_is_display int DEFAULT 1;

		DECLARE c CURSOR FOR
			  SELECT  column_name, column_text,is_display
			  FROM 	ec_apps_tables			a,
				ec_apps_tables_description	b,
				ec_company_apps_tables 		c
			  WHERE a.apps_table_id=b.apps_table_id
			    AND a.table_name=p_table_name
			    AND a.apps_table_id=c.apps_table_id
			    AND a.language_id=p_language_id
			    AND c.company_code=p_comp_cd
			    AND c.is_active=1
          and b.is_display=1
			  ORDER BY b.display_seq;

		DECLARE CONTINUE HANDLER FOR NOT FOUND SET l_last_row=1;
    set v_coma='';
		OPEN c;
    SET v_total_rec = (Select FOUND_ROWS());
	  c_cursor: LOOP
		   FETCH c INTO v_col, v_head,v_is_display;

     IF (l_last_row=1) THEN
          LEAVE c_cursor;
     ELSE

       SET v_count = v_count+1;
        IF(v_count < v_total_rec) and v_is_display=1 THEN

          set v_coma=concat(",",char(10));
        ELSE
          set v_coma="";
        END IF;
          IF v_is_display=1 THEN
            SET stmt_text= concat(stmt_text,v_col, " as ", "'", v_head,"'",v_coma);
          END IF;
     END if;

		END LOOP c_cursor;
    CLOSE c;
		return concat(v_select,char(10),stmt_text,char(10),v_from,p_table_name);
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `fnc_facility_name`
--

DROP FUNCTION IF EXISTS `fnc_facility_name`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `fnc_facility_name`(p_facility_id int) RETURNS varchar(255) CHARSET latin1
BEGIN

DECLARE v_facility_name varchar(255) DEFAULT null;
begin

	select facility_name into v_facility_name
 from mc_facility
 where facility_id=p_facility_id;

  
end;
RETURN v_facility_name;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `fnc_getAttributePath`
--

DROP FUNCTION IF EXISTS `fnc_getAttributePath`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `fnc_getAttributePath`(p_comp_cd int, p_attribute_name varchar(255)) RETURNS varchar(255) CHARSET latin1
BEGIN

DECLARE v_attribute_value varchar(255) DEFAULT null;
begin

	select av.attribute_value into v_attribute_value
	from   ec_setup_attributes   sa,
	       ec_attribute_values   av,
	       ec_company_attributes ca
	where  sa.attribute_name=
			(select  sa.stored_location_attribute
			   from  ec_setup_attributes    sa,
			         ec_company_attributes  ca
			  where  sa.attribute_id=ca.attribute_id
			    and  ca.company_code=p_comp_cd
			    and  ca.is_active=1
			    and  sa.is_active=1
			    and  sa.attribute_name=p_attribute_name
			 )
	  and  sa.attribute_id=av.attribute_id
	  and  sa.attribute_id=ca.attribute_id
	  and  ca.company_code=p_comp_cd 
	  and  ca.company_code=av.company_code
	  and  ca.is_active=1
	  and  av.is_active=1
  	  and  sa.is_active=1;
  
end;
RETURN v_attribute_value;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `fnc_getAttributeValue`
--

DROP FUNCTION IF EXISTS `fnc_getAttributeValue`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `fnc_getAttributeValue`(p_comp_cd int, p_attribute_name varchar(255)) RETURNS varchar(255) CHARSET latin1
BEGIN

DECLARE v_attribute_value varchar(255) DEFAULT null;

begin
	

	select av.attribute_value into v_attribute_value
	from   ec_setup_attributes   sa,
	       ec_attribute_values   av,
	       ec_company_attributes  ca
	where  sa.attribute_name=p_attribute_name
	  and  sa.attribute_id=av.attribute_id
	  and  sa.attribute_id=ca.attribute_id
	  and  (sa.web_template_id=fnc_getCompanyWebTemplateID(p_comp_cd) or sa.web_template_id is null)
	  and  ca.company_code=1
	  and  ca.company_code=av.company_Code
	  and  ca.is_active=1
	  and  av.is_active=1
  	  and  sa.is_active=1;
  
end;
RETURN v_attribute_value ;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `fnc_getCompanyWebTemplateID`
--

DROP FUNCTION IF EXISTS `fnc_getCompanyWebTemplateID`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `fnc_getCompanyWebTemplateID`(p_comp_cd int) RETURNS int(11)
BEGIN

DECLARE v_template_id int DEFAULT 0;
begin

	select web_template_id into v_template_id
	from ec_web_templates_events
	where company_code=p_comp_cd
	and CURDATE() between start_Date and end_Date;
end;
RETURN v_template_id;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `isnumeric`
--

DROP FUNCTION IF EXISTS `isnumeric`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `isnumeric`(s varchar(255)) RETURNS int(11)
begin
   set @match = '^(([0-9+-.$]{1})|([+-]?[$]?[0-9]*(([.]{1}[0-9]*)|([.]?[0-9]+))))$';
   
   return if(s regexp @match, 1, 0);
   end $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `next_day`
--

DROP FUNCTION IF EXISTS `next_day`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `next_day`(p_date datetime,p_day nvarchar (20)) RETURNS date
BEGIN

DECLARE v_date date default DATE_FORMAT(now(), '%Y-%m-%d');
DECLARE v_day varchar(20) ;
DECLARE v_cnt int default 0 ;
begin

    set v_date=DATE_FORMAT(p_date, '%Y-%m-%d');

LOOP1: LOOP
 SET v_date=DATE_ADD(v_date, INTERVAL 1 DAY);

     SET v_day=dayname(v_date);
 SET v_cnt=v_cnt+1;
IF upper(v_day)=upper(p_day) OR v_cnt >7 then
  LEAVE LOOP1;
END IF;

END LOOP;

end;
RETURN v_date ;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of function `nvl2`
--

DROP FUNCTION IF EXISTS `nvl2`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` FUNCTION `nvl2`(p_para1 VARCHAR(255), p_para2 VARCHAR(255)) RETURNS varchar(255) CHARSET latin1
BEGIN

DECLARE p_String VARCHAR(255) DEFAULT null;
begin

if p_para1='' or p_para1 is null THEN

  set p_para1 = null;
end if;
 IF p_para1 is not null THEN
  set p_String=p_para1;
 Else
  set p_String=p_para2;
  END IF;
end;
RETURN p_String;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `dsql_example4`
--

DROP PROCEDURE IF EXISTS `dsql_example4`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `dsql_example4`(db_name VARCHAR(64), 
			template VARCHAR(65535))
BEGIN
		DECLARE done INT DEFAULT 0;
		DECLARE tname VARCHAR(64);
		DECLARE c CURSOR FOR
			  SELECT table_name 
			  FROM information_schema.TABLES 
			  WHERE table_schema=db_name;
		DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done= 1;
		
		OPEN c;
		REPEAT
		   FETCH c INTO tname;
		   SET @stmt_text=REPLACE(template, " ?", concat(" ", tname));
		   
		   BEGIN
		       DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
		        SELECT CONCAT("'", @stmt_text, "' command failed") AS "error";
			PREPARE stmt FROM @stmt_text;
			EXECUTE stmt;
		        DEALLOCATE prepare stmt;
	           END;
		UNTIL done END REPEAT;
        END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_apps_msg`
--

DROP PROCEDURE IF EXISTS `sp_apps_msg`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_apps_msg`(
  		IN p_comp_cd int,
  		IN p_app_cd VARCHAR(05),
  		IN p_msg_cd  VARCHAR(05),
                IN p_language_id int,
  		OUT p_msg_text text,
  		OUT p_msg_sev  int)
BEGIN
  		SELECT msg_text,msg_sev
  		INTO p_msg_text, p_msg_sev
  		FROM ec_apps_messges a,
  		     ec_company_apps_messages b
  		WHERE a.apps_msg_id=b.apps_msg_id
  		  AND b.company_code=p_comp_cd
                  AND a.language_id=p_language_id
  		  AND a.app_code=p_app_cd
  		  AND a.msg_code=p_msg_cd;
  		  
  		  set p_msg_text=CONCAT(p_comp_cd,'-',p_msg_code,'-',p_msg_text);
  		  
      END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_getImageAttributeValue`
--

DROP PROCEDURE IF EXISTS `sp_getImageAttributeValue`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_getImageAttributeValue`(
		IN p_comp_cd         	int,
		IN p_attribute_name 	nvarchar(100),
		OUT p_attribute_value   nvarchar(200),
		OUT p_top_padding       int,
		OUT p_left_padding   	int,
		OUT p_attribute_height  int,
		OUT p_attribute_width   int,
		OUT p_attribute_style   nvarchar(20)
		)
BEGIN
	DECLARE v_template_id int DEFAULT 1;
begin

	select av.attribute_value,av.top_padding,av.left_padding,av.attribute_height,
	       av.attribute_width, av.attribute_style
	into   p_attribute_value,p_top_padding,p_left_padding,p_attribute_height,
	       p_attribute_width, p_attribute_style
	from   ec_setup_attributes   sa,
	       ec_attribute_values   av,
	       ec_company_attributes  ca
	where  sa.attribute_name=p_attribute_name
	  and  sa.attribute_id=av.attribute_id
	  and  sa.attribute_id=ca.attribute_id
	  and  (sa.web_template_id=v_template_id or sa.web_template_id is null)
	  and  ca.company_code=p_comp_cd
	  and  ca.company_code=av.company_Code
	  and  ca.is_active=1
	  and  av.is_active=1
	  and  sa.is_active=1;

end;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_l_getListvalue`
--

DROP PROCEDURE IF EXISTS `sp_l_getListvalue`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_l_getListvalue`(
		in p_comp_cd	       int,
		in p_attribute_name    varchar(200)
		)
BEGIN
select av.attribute_value as ID ,av.attribute_value_desc as V_TEXT
from   ec_setup_attributes   sa,
       ec_attribute_values   av,
       ec_company_attributes  ca
where  sa.attribute_name=p_attribute_name
  and  sa.attribute_id=av.attribute_id
  and  sa.attribute_id=ca.attribute_id
  and  ca.company_code=p_comp_cd
  and  ca.company_code=av.company_Code
  and  ca.is_active=1
  and  av.is_active=1
  and  sa.is_active=1;

END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_l_getTableDescription`
--

DROP PROCEDURE IF EXISTS `sp_l_getTableDescription`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_l_getTableDescription`(IN p_comp_code  VARCHAR(2),
                                                           IN p_table  VARCHAR(30),
                                                           IN p_apps_code VARCHAR(5),
                                                           IN p_is_actice int(1))
BEGIN
SELECT b.*
				FROM  ec_apps_tables a,
				     ec_apps_tables_description b,
				     ec_company_apps_tables c
				WHERE c.company_code=p_comp_code
				  and a.apps_table_id=b.apps_table_id
				  and a.apps_table_id=c.apps_table_id
				  and a.language_id=1
				  and a.apps_code=p_apps_code
				  and a.table_name=p_table
          and b.is_display=1
				  and b.IS_ACTIVE=p_is_actice
        ORDER BY b.display_seq;

END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_maint_mc_company_facility`
--

DROP PROCEDURE IF EXISTS `sp_maint_mc_company_facility`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_maint_mc_company_facility`(
                INOUT p_company_facility_id  int ,
                IN    p_facility_id          int ,
                IN    p_display_seq          int ,
                IN    p_is_default           int ,
                IN    p_is_active            int ,
                IN    P_created_date         date ,
                IN    p_last_udpated_date    date ,
		IN    p_comp_cd	    int,
		in    p_language_id    int,
		IN    p_user_id	    int,
  		OUT   p_msg_icon nvarchar(200),
  		OUT   p_msg_text text,
  		OUT   p_msg_sev  int)
BEGIN
		DECLARE v_cnt int DEFAULT 0;
	Begin
		IF p_company_facility_id is not null then
			select count(1) into v_cnt 
			from mc_company_facility
	               	where company_facility_id= p_company_facility_id;
		End If;

	End;
		IF v_cnt =0 then

		   Insert into mc_company_facility (
			facility_id         ,
			company_code        ,
			display_seq         ,
			is_default          ,
			is_active           ,
			created_date        ,
			created_by          ,
			last_udpated_date   ,
			last_updated_by     
			)
		   values 
		     (
			p_facility_id       ,
			p_comp_cd           ,
			p_display_seq       ,
			p_is_default        ,
			p_is_active         ,
			CURDATE()           ,
			p_user_id           ,
			CURDATE()   	    ,
			p_user_id
		     );


		    
		    set p_company_facility_id=LAST_INSERT_ID();


		call sp_apps_msg(p_comp_cd,'MCH','00002',p_language_id, p_msg_text,p_msg_sev);

		Else
		     IF v_cnt >0 then

		     update mc_company_facility set
			facility_id	  	 =	p_facility_id	,
			company_code  		=	p_comp_cd  	,
			display_seq       =	p_display_seq   ,
			is_default      	=	p_is_default   	,
			is_active      	 =	p_is_active     ,
			last_updated_date =	CURDATE(),
			last_update_by		=	p_user
		    Where company_facility_id	=	p_company_facility_id;

		    call sp_apps_msg(p_comp_cd,'MCH','00003',p_language_id, p_msg_text,p_msg_sev);

		    Else

		   call sp_apps_msg(p_comp_cd,'MCH','00001',p_language_id, p_msg_text,p_msg_sev);

		    End if;

		End if;

		commit;
      END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_maint_mc_specialist`
--

DROP PROCEDURE IF EXISTS `sp_maint_mc_specialist`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_maint_mc_specialist`(
		INOUT p_specialist_id int,
		IN p_first_name	    nvarchar(20),
		IN p_middle_name    nvarchar(20),
		IN p_last_name      nvarchar(20),
		IN p_title          nvarchar(50),
		IN p_degree_line1   nvarchar(100),
		IN p_degree_line2   nvarchar(100),
		IN p_office_phone   nvarchar(20),
		IN p_home_phone     nvarchar(20),
		IN p_cell_phone     nvarchar(20),
		IN p_email_adderess nvarchar(100),
		IN p_specialist_picture_path nvarchar(200),
		IN p_is_picture_display int,
		IN p_display_seq        int,
		IN p_admin_comments nvarchar(400),
		IN p_is_active      int,
		IN p_comp_cd	    int,
		in p_language_id    int,
		IN p_user_id	    int,
  		OUT p_msg_icon nvarchar(200),
  		OUT p_msg_text text,
  		OUT p_msg_sev  int)
BEGIN
		DECLARE v_cnt int DEFAULT 0;
	Begin
		IF p_specialist_id is not null then
			select count(1) into v_cnt 
			from mc_specialist
	               	where specialist_id= p_specialist_id;
		End If;

	End;
		IF v_cnt =0 then

		   Insert into mc_specialist (
			first_name	  	,	
			middle_name  		,
			last_name    		,
			title        		,
			degree_line1 		,
			degree_line2 		,
			office_phone 		,
			home_phone   		,
			cell_phone   		,
			email_adderess 		,
			specialist_picture_path,
			is_picture_display 	,
			display_seq        	,
			admin_comments 		,
			is_active      		,
			created_date,
			created_by,
			last_updated_date,
			last_update_by
			)
		   values 
		     (
			p_first_name,	  		
			p_middle_name,  		
			p_last_name   , 		
			p_title       , 		
			p_degree_line1, 		
			p_degree_line2, 		
			p_office_phone, 		
			p_home_phone  , 		
			p_cell_phone  , 		
			p_email_adderess, 		
			p_specialist_picture_path,
			p_is_picture_display, 	
			p_display_seq     ,   	
			p_admin_comments ,		
			p_is_active      ,		
			p_user_id	 , 
			CURDATE()	,
			p_user_id	 ,
			CURDATE()
		     );
		    
		    set p_specialist_id=LAST_INSERT_ID();


		call sp_apps_msg(p_comp_cd,'MCH','00002',p_language_id, p_msg_text,p_msg_sev);

		Else
		     IF v_cnt >0 then

		     update mc_specialist set
			first_name	  	=	p_first_name	,
			middle_name  		=	p_middle_name  	,
			last_name    		=	p_last_name    	,
			title        		=	p_title        	,
			degree_line1 		=	p_degree_line1 	,
			degree_line2 		=	p_degree_line2 	,
			office_phone 		=	p_office_phone 	,
			home_phone   		=	p_home_phone   	,
			cell_phone   		=	p_cell_phone   	,
			email_adderess 		=	p_email_adderess ,
			specialist_picture_path	=	p_specialist_picture_path,
			is_picture_display 	=	p_is_picture_display 	,
			display_seq        	=	p_display_seq        	,
			admin_comments 		=	p_admin_comments 	,
			is_active      		=	p_is_active      	,
			last_updated_date	=	CURDATE(),
			last_update_by		=	p_user
		    Where specialist_id		=	p_specialist_id;

		    call sp_apps_msg(p_comp_cd,'MCH','00003',p_language_id, p_msg_text,p_msg_sev);

		    Else

		   call sp_apps_msg(p_comp_cd,'MCH','00001',p_language_id, p_msg_text,p_msg_sev);

		    End if;

		End if;

		commit;
      END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_rst_l_mc_facility`
--

DROP PROCEDURE IF EXISTS `sp_rst_l_mc_facility`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_rst_l_mc_facility`(
       p_company_code         int ,
       p_language_id          int
  )
BEGIN

  select ' ' as ID,'Select..' as id_name ,-1 as ord
  union
  select facility_id as ID ,facility_name as id_name,display_seq as ord
  from mc_facility 
  where company_code=p_company_code
--  and   language_id =p_language_id
  order by ord;

  END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_rst_m_mc_facility`
--

DROP PROCEDURE IF EXISTS `sp_rst_m_mc_facility`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_rst_m_mc_facility`(
       p_facility_id          int ,
       p_city                 nvarchar(50) ,
       p_state                nvarchar(20) ,
       p_phone                nvarchar(20) ,
       p_company_code         int ,
       p_language_id          int

  )
BEGIN

  DECLARE v_sql_stmt    nvarchar(8000) default ' ';
  DECLARE v_where_clause  nvarchar(4000) default ' ';

  set v_where_clause = concat(char(10),' WHERE ');
--  set v_where_clause = concat(v_where_clause,' facility_id=',nvl2(p_facility_id,0), char(10));
    set v_where_clause = concat(v_where_clause,'facility_id=',nvl2(p_facility_id,'facility_id '),char(10));

  IF IFNULL(p_city,'') != '' THEN
    set v_where_clause = concat(v_where_clause,'AND city like ',nvl2(concat( "'",'%',p_city,'%',"'"),'city_name'), char(10));
  END IF;

  IF IFNULL(p_state,'') != '' THEN
    set v_where_clause = concat(v_where_clause,'AND state like ',nvl2(concat( "'",'%',p_state,'%',"'"),'state'), char(10));
  END IF;

  IF IFNULL(p_phone,'') != '' THEN
    set v_where_clause = concat(v_where_clause,'AND phone01 like ',nvl2(concat( "'",'%',p_phone,'%',"'"),'phone01'), char(10));
  END IF;
  Set v_sql_stmt= fnc_dsql_factory(p_company_code,p_language_id,'mc_facility');


  SET @text_stmt= concat(v_sql_stmt,v_where_clause);
-- select @text_stmt;

   PREPARE stmt FROM @text_stmt;
       EXECUTE stmt;
      DEALLOCATE prepare stmt;


  END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `sp_rst_s_mc_facility`
--

DROP PROCEDURE IF EXISTS `sp_rst_s_mc_facility`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_rst_s_mc_facility`(
       p_facility_id          int,
       p_company_code int,
       p_language_id int

  )
BEGIN

  DECLARE v_sql_stmt    nvarchar(8000) default ' ';
  DECLARE v_where_clause  nvarchar(4000) default ' ';

  set v_where_clause = concat(char(10),' WHERE ');
  set v_where_clause = concat(v_where_clause,concat('facility_id=',p_facility_id));


  Set v_sql_stmt= fnc_dsql_factory(p_company_code,p_language_id,'mc_facility');


  SET @text_stmt= concat(v_sql_stmt,v_where_clause);

  PREPARE stmt FROM @text_stmt;
      EXECUTE stmt;
      DEALLOCATE prepare stmt;


  END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;



/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
