


-- --------------------------------------------------------

--
-- Table structure for table `answer_subscribers`
--

CREATE TABLE IF NOT EXISTS `answer_subscribers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `answer_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`contact_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `birthdays`
--

CREATE TABLE IF NOT EXISTS `birthdays` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  `message` varchar(250) NOT NULL,
  `systemmsg` varchar(255) NOT NULL,
  `days` int(11) NOT NULL,
  `sent` int(11) NOT NULL COMMENT '0=No,1=Yes',
  `sms_type` int(11) NOT NULL COMMENT '0=>sms , 1=>mms',
  `image_url` text NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contacts`
--

CREATE TABLE IF NOT EXISTS `contacts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `birthday` date NOT NULL,
  `phone_number` varchar(15) NOT NULL,
  `created` datetime NOT NULL,
  `carrier` varchar(50) NOT NULL,
  `location` varchar(50) NOT NULL,
  `phone_country` varchar(50) NOT NULL,
  `line_type` varchar(20) NOT NULL,
  `favorite` tinyint(4) NOT NULL DEFAULT '0',
  `un_subscribers` tinyint(4) NOT NULL DEFAULT '0',
  `color` varchar(20) NOT NULL,
  `lastmsg` datetime NOT NULL,
  `stickysender` varchar(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`name`),
  INDEX(`phone_number`),
  INDEX(`stickysender`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contact_groups`
--

CREATE TABLE IF NOT EXISTS `contact_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `contest_id` int(11) NOT NULL,
  `group_subscribers` varchar(250) NOT NULL,
  `un_subscribers` int(11) NOT NULL,
  `do_not_call` int(11) NOT NULL,
  `subscribed_by_sms` int(11) NOT NULL COMMENT '0=csv,1=sms,2=widget,3=kiosk',
  `active` int(11) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`contact_id`),
  INDEX(`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contests`
--

CREATE TABLE IF NOT EXISTS `contests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_name` varchar(250) NOT NULL,
  `keyword` varchar(250) NOT NULL,
  `system_message` varchar(250) NOT NULL,
  `active` int(1) NOT NULL,
  `totalsubscriber` int(11) NOT NULL,
  `winning_phone_number` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contest_subscribers`
--

CREATE TABLE IF NOT EXISTS `contest_subscribers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `contest_id` int(11) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`phone_number`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `groups`
--

CREATE TABLE IF NOT EXISTS `groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_name` varchar(100) NOT NULL,
  `keyword` varchar(100) NOT NULL,
  `group_type` int(11) NOT NULL,
  `auto_message` varchar(100) NOT NULL,
  `system_message` varchar(130) DEFAULT NULL,
  `sms_type` int(11) NOT NULL COMMENT '1=> sms ,2=>mms',
  `bithday_enable` int(11) NOT NULL DEFAULT '0',
  `image_url` text NOT NULL,
  `active` int(11) NOT NULL,
  `totalsubscriber` int(11) NOT NULL,
  `notify_signup` int(11) NOT NULL DEFAULT '0',
  `mobile_number_input` varchar(50) NOT NULL,
  `property_address` varchar(50) DEFAULT NULL,
  `property_price` varchar(20) DEFAULT NULL,
  `property_bed` tinyint(4) DEFAULT NULL,
  `property_bath` varchar(5) DEFAULT NULL,
  `property_description` varchar(200) DEFAULT NULL,
  `property_url` varchar(200) DEFAULT NULL,
  `vehicle_year` varchar(10) DEFAULT NULL,
  `vehicle_make` varchar(30) DEFAULT NULL,
  `vehicle_model` varchar(30) DEFAULT NULL,
  `vehicle_mileage` varchar(30) DEFAULT NULL,
  `vehicle_price` varchar(20) DEFAULT NULL,
  `vehicle_description` varchar(200) DEFAULT NULL,
  `vehicle_url` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`keyword`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `group_sms_blasts`
--

CREATE TABLE IF NOT EXISTS `group_sms_blasts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `totals` int(11) NOT NULL,
  `total_successful_messages` int(11) NOT NULL,
  `total_failed_messages` int(11) NOT NULL,
  `isdeleted` int(11) NOT NULL,
  `responder` int(11) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `invoices`
--

CREATE TABLE IF NOT EXISTS `invoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `txnid` varchar(250) NOT NULL,
  `type` int(11) NOT NULL,
  `package_name` varchar(50) NOT NULL,
  `amount` float NOT NULL,
  `created` date NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------

--
-- Table structure for table `logs`
--

CREATE TABLE IF NOT EXISTS `logs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `group_sms_id` int(11) NOT NULL,
  `sms_id` varchar(250) DEFAULT NULL,
  `ticket` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `group_id` int(11) DEFAULT '0',
  `contact_id` int(11) NOT NULL DEFAULT '0',
  `phone_number` varchar(20) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `email_to_sms_number` varchar(20) NOT NULL,
  `text_message` text,
  `image_url` text NOT NULL,
  `voice_url` varchar(255) DEFAULT NULL,
  `call_duration` varchar(15) DEFAULT NULL,
  `route` enum('inbox','outbox') NOT NULL DEFAULT 'inbox',
  `msg_type` enum('text','voice','broadcast','callforward') NOT NULL DEFAULT 'text',
  `inbox_type` tinyint(4) NOT NULL DEFAULT '1',
  `sms_status` varchar(250) NOT NULL,
  `error_message` text,
  `read` tinyint(1) NOT NULL DEFAULT '0',
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  `msgsound` tinyint(4) NOT NULL DEFAULT '0',
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`group_sms_id`),
  INDEX(`sms_id`),
  INDEX(`contact_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `mobile_pages`
--

CREATE TABLE IF NOT EXISTS `mobile_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(250) NOT NULL,
  `description` text NOT NULL,
  `header_logo` varchar(250) DEFAULT NULL,
  `header_color` varchar(250) NOT NULL,
  `headerfont_color` varchar(250) NOT NULL,
  `bodybg_color` varchar(250) NOT NULL,
  `footer_color` varchar(250) NOT NULL,
  `footertext_color` varchar(250) NOT NULL,
  `footertext` varchar(250) NOT NULL,
  `map_url` text NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `monthly_packages`
--

CREATE TABLE IF NOT EXISTS `monthly_packages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` varchar(50) NOT NULL,
  `package_name` varchar(250) NOT NULL,
  `amount` float NOT NULL,
  `text_messages_credit` varchar(20) NOT NULL,
  `voice_messages_credit` varchar(20) NOT NULL,
  `status` int(11) NOT NULL,
  `user_country` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------

--
-- Table structure for table `options`
--

CREATE TABLE IF NOT EXISTS `options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question_id` int(11) NOT NULL,
  `optiona` varchar(250) NOT NULL,
  `optionb` varchar(50) NOT NULL,
  `autorsponder_message` varchar(250) NOT NULL,
  `count` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `packages`
--

CREATE TABLE IF NOT EXISTS `packages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` varchar(20) NOT NULL,
  `name` varchar(255) NOT NULL,
  `amount` float NOT NULL,
  `credit` int(11) NOT NULL,
  `type` enum('text','voice') NOT NULL DEFAULT 'text',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `user_country` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------

--
-- Table structure for table `paypal_items`
--

CREATE TABLE IF NOT EXISTS `paypal_items` (
  `id` varchar(36) NOT NULL,
  `instant_payment_notification_id` varchar(36) NOT NULL,
  `item_name` varchar(127) DEFAULT NULL,
  `item_number` varchar(127) DEFAULT NULL,
  `quantity` varchar(127) DEFAULT NULL,
  `mc_gross` float(10,2) DEFAULT NULL,
  `mc_shipping` float(10,2) DEFAULT NULL,
  `mc_handling` float(10,2) DEFAULT NULL,
  `tax` float(10,2) DEFAULT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `qrcods`
--

CREATE TABLE IF NOT EXISTS `qrcods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------

--
-- Table structure for table `questions`
--

CREATE TABLE IF NOT EXISTS `questions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `question` text NOT NULL,
  `active` int(11) NOT NULL,
  `autoreply_message` varchar(250) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `referrals`
--

CREATE TABLE IF NOT EXISTS `referrals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT 'new_user_id',
  `referred_by` int(11) NOT NULL COMMENT 'referred_by',
  `url` varchar(255) DEFAULT NULL,
  `amount` float NOT NULL,
  `paid_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-unpaid,1-paid',
  `type` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `account_activated` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `responders`
--

CREATE TABLE IF NOT EXISTS `responders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `name` varchar(250) NOT NULL,
  `message` varchar(250) NOT NULL,
  `systemmsg` varchar(255) NOT NULL,
  `days` int(11) NOT NULL,
  `ishour` tinyint(4) NOT NULL DEFAULT '1',
  `sent` int(11) NOT NULL COMMENT '0=No,1=Yes',
  `sms_type` int(11) NOT NULL COMMENT '0=>sms , 1=>mms',
  `image_url` text NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `schedule_messages`
--

CREATE TABLE IF NOT EXISTS `schedule_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `message` text NOT NULL,
  `systemmsg` varchar(255) NOT NULL,
  `send_on` datetime NOT NULL,
  `sent` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `rotate_number` int(11) NOT NULL,
  `msg_type` int(11) NOT NULL,
  `mms_text` text NOT NULL,
  `pick_file` varchar(200) NOT NULL,
  `throttle` int(11) NOT NULL,
  `alphasender` tinyint(4) NOT NULL,
  `alphasender_input` varchar(15) NOT NULL,
  `sendfrom` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `schedule_message_groups`
--

CREATE TABLE IF NOT EXISTS `schedule_message_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `schedule_sms_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shortlinks`
--

CREATE TABLE IF NOT EXISTS `shortlinks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `shortname` varchar(250) NOT NULL,
  `url` varchar(250) NOT NULL,
  `short_url` varchar(250) NOT NULL,
  `clicks` int(11) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `single_schedule_messages`
--

CREATE TABLE IF NOT EXISTS `single_schedule_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `schedule_sms_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------

--
-- Table structure for table `smstemplates`
--

CREATE TABLE IF NOT EXISTS `smstemplates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL,
  `messagename` varchar(250) NOT NULL,
  `message_template` varchar(1588) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `user_numbers`
--

CREATE TABLE IF NOT EXISTS `user_numbers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `number` varchar(20) NOT NULL,
  `phone_sid` varchar(250) NOT NULL,
  `api_type` int(11) NOT NULL,
  `country_code` varchar(255) DEFAULT NULL,
  `created` datetime NOT NULL,
  `sms` int(11) NOT NULL DEFAULT '0',
  `mms` int(11) NOT NULL,
  `voice` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`number`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `voice_messages`
--

CREATE TABLE IF NOT EXISTS `voice_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `message_type` int(11) NOT NULL,
  `text_message` text NOT NULL,
  `audio` varchar(200) NOT NULL,
  `created` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------
--
-- Table structure for table `smsloyalties`
--

CREATE TABLE IF NOT EXISTS `smsloyalties` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `program_name` varchar(250) NOT NULL,
  `group_id` int(11) NOT NULL,
  `startdate` date NOT NULL,
  `enddate` date NOT NULL,
  `coupancode` varchar(100) NOT NULL,
  `codestatus` varchar(100) NOT NULL,
  `reachgoal` int(11) NOT NULL,
  `addpoints` text NOT NULL,
  `reachedatgoal` text NOT NULL,
  `checkstatus` text NOT NULL,
  `type` int(11) NOT NULL DEFAULT '1' COMMENT '1=>SMS,2=>MMS',
  `image` varchar(250) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `notify_punch_code` int(11) NOT NULL DEFAULT '0',
  `my_email_address` int(11) NOT NULL DEFAULT '0',
  `email_address` int(11) NOT NULL DEFAULT '0',
  `email_address_input` varchar(50) NOT NULL,
  `mobile_number` int(11) NOT NULL DEFAULT '0',
  `mobile_number_input` varchar(50) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `smsloyalty_users`
--

CREATE TABLE IF NOT EXISTS `smsloyalty_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `unique_key` varchar(100) NOT NULL,
  `user_id` int(11) NOT NULL,
  `sms_loyalty_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `keyword` varchar(100) NOT NULL,
  `count_trial` int(11) NOT NULL,
  `is_winner` int(11) NOT NULL,
  `redemptions` int(11) NOT NULL,
  `msg_date` date NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`contact_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


-- -------------------------------------------------------

--
-- Table structure for table `kiosks`
--

CREATE TABLE IF NOT EXISTS `kiosks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `unique_id` varchar(100) NOT NULL,
  `user_id` int(11) NOT NULL,
  `loyalty_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `background_color` varchar(100) DEFAULT NULL,
  `style` varchar(100) DEFAULT NULL,
  `file` varchar(255) DEFAULT NULL,
  `business_logo` varchar(255) NOT NULL,
  `textheader` text NOT NULL,
  `alignment` varchar(100) DEFAULT NULL,
  `font` varchar(100) DEFAULT NULL,
  `fontsize` varchar(100) DEFAULT NULL,
  `color` varchar(100) DEFAULT NULL,
  `styleB` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `styleI` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `styleU` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `joinbuttons` int(11) DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `punchcard` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `checkpoints` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `joinbutton` varchar(100) DEFAULT NULL,
  `checkin` varchar(100) DEFAULT NULL,
  `mypoints` varchar(100) DEFAULT NULL,
  `buttoncolor` varchar(100) DEFAULT NULL,
  `textcolor` varchar(100) DEFAULT NULL,
  `keypad_button_color` varchar(100) DEFAULT NULL,
  `keypad_text_color` varchar(100) DEFAULT NULL,
  `bottom_text` text,
  `bottom_text_alignment` varchar(100) DEFAULT NULL,
  `bottom_text_font` varchar(100) DEFAULT NULL,
  `bottom_text_size` varchar(100) DEFAULT NULL,
  `bottom_text_color` varchar(100) DEFAULT NULL,
  `bottom_text_styleB` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `bottom_text_styleI` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `bottom_text_styleU` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `firstname` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `lastname` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `email` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `dob` int(11) NOT NULL DEFAULT '0' COMMENT '0=>No,1=>Yes',
  `created` datetime NOT NULL COMMENT '0=>No,1=>Yes',
  PRIMARY KEY (`id`),
  INDEX(`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `monthly_number_packages`
--

CREATE TABLE IF NOT EXISTS `monthly_number_packages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plan` varchar(50) NOT NULL,
  `package_name` varchar(250) NOT NULL,
  `amount` float NOT NULL,
  `total_secondary_numbers` int(11) NOT NULL,
  `country` varchar(50) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

-- --------------------------------------------------------


--
-- Table structure for table `activity_timeline`
--

CREATE TABLE IF NOT EXISTS `activity_timelines` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `activity` tinyint(4) NOT NULL,
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  INDEX(`user_id`),
  INDEX(`contact_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------


