-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2016 at 01:37 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!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 */;

--
-- Database: `realstatecrmpro`
--

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

--
-- Table structure for table `awallets`
--

DROP TABLE IF EXISTS `awallets`;
CREATE TABLE IF NOT EXISTS `awallets` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `debit` decimal(10,2) DEFAULT NULL,
  `credit` decimal(10,2) DEFAULT NULL,
  `balance` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `awallet_histories`
--

DROP TABLE IF EXISTS `awallet_histories`;
CREATE TABLE IF NOT EXISTS `awallet_histories` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `deals_payment_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `type` varchar(6) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `remarks` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `calendars`
--

DROP TABLE IF EXISTS `calendars`;
CREATE TABLE IF NOT EXISTS `calendars` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `message_type` varchar(255) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `color` varchar(20) DEFAULT NULL,
  `comments` text,
  `is_repeat` smallint(5) unsigned DEFAULT NULL,
  `repeat_type` varchar(10) DEFAULT NULL,
  `repeat_no` int(11) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=26 ;

--
-- Dumping data for table `calendars`
--

INSERT INTO `calendars` (`id`, `user_id`, `message_type`, `start_date`, `end_date`, `color`, `comments`, `is_repeat`, `repeat_type`, `repeat_no`) VALUES
(18, 11, 'Meeting', '2016-11-15 02:00:00', '2016-11-18 02:01:00', '#ff0080', 'Donec iaculis orci ac neque vulputate, in tincidunt augue interdum. Vivamus rutrum commodo tortor, ornare condimentum tortor condimentum a. In vel mollis quam.', 0, '', 0),
(19, 7, 'Morning Meeting', '2016-12-01 10:00:00', '2016-12-05 10:01:00', '#ff8000', 'Etiam vel porttitor erat. Quisque gravida magna non vehicula auctor. In mollis leo id semper porta.', 1, 'MON', 12),
(21, 11, 'Document Collection', '2016-06-24 09:00:00', '2016-11-30 10:00:00', '#ff8080', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at mi ac nisl tempor rhoncus.', 0, '', 0);

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

--
-- Table structure for table `categories`
--

DROP TABLE IF EXISTS `categories`;
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `type` varchar(3) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `type`) VALUES
(1, 'Website', 'WEB'),
(2, 'Customer', NULL),
(3, 'Staff', NULL),
(4, 'My Realty', NULL);

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

--
-- Table structure for table `clients`
--

DROP TABLE IF EXISTS `clients`;
CREATE TABLE IF NOT EXISTS `clients` (
`id` int(11) NOT NULL,
  `category_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `project_id` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `address` mediumtext,
  `district` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `pincode` varchar(100) DEFAULT NULL,
  `status` varchar(7) DEFAULT 'Active',
  `last_login` datetime DEFAULT NULL,
  `dirt` varchar(255) DEFAULT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `reg_code` varchar(6) DEFAULT NULL,
  `reg_status` varchar(4) NOT NULL DEFAULT 'Live',
  `presetcode` varchar(10) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=65 ;

--
-- Dumping data for table `clients`
--

INSERT INTO `clients` (`id`, `category_id`, `user_id`, `project_id`, `email`, `password`, `mobile`, `phone`, `name`, `address`, `district`, `state`, `pincode`, `status`, `last_login`, `dirt`, `photo`, `reg_code`, `reg_status`, `presetcode`, `created`, `modified`) VALUES
(55, 2, NULL, NULL, 'client@demo.com', 'e41f2b7320732d52cbc55c70a7e96844259d512d9087dde5ff830723b2aa82dc', '0000000000', '0000000000', 'Client 1', '', 'Hamberg', '', '211003', 'Active', '2016-11-18 17:56:20', NULL, NULL, NULL, 'Live', NULL, '2016-06-15 16:08:58', '2016-11-18 17:56:20'),
(56, 3, NULL, NULL, 'billy@gmail.com', 'a2ebbd5d460dcfb934f5c6a349688a2d9dae8b22f6d148b226f29ad01bdf34aa', '0000000000', '0000000000', 'Billy Bordan', '', '', 'Mexico', '', 'Active', NULL, NULL, NULL, NULL, 'Live', NULL, '2016-06-15 16:10:42', '2016-11-18 12:25:55');

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

--
-- Table structure for table `configurations`
--

DROP TABLE IF EXISTS `configurations`;
CREATE TABLE IF NOT EXISTS `configurations` (
`id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `organization_name` varchar(255) DEFAULT NULL,
  `domain_name` varchar(255) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `meta_title` text,
  `meta_desc` text,
  `timezone` varchar(100) DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `sms_notification` tinyint(1) DEFAULT NULL,
  `email_notification` tinyint(1) DEFAULT NULL,
  `guest_login` tinyint(1) DEFAULT NULL,
  `front_end` tinyint(1) DEFAULT NULL,
  `slides` tinyint(4) DEFAULT NULL,
  `translate` tinyint(4) DEFAULT '0',
  `contact` varchar(100) DEFAULT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `currency` int(11) DEFAULT NULL,
  `date_format` varchar(25) DEFAULT NULL,
  `address` text,
  `account_details` text,
  `short_name` varchar(6) DEFAULT NULL,
  `due_days` int(11) DEFAULT NULL,
  `late_fees` int(11) DEFAULT NULL,
  `language` varchar(6) DEFAULT NULL,
  `dir_type` tinyint(4) DEFAULT NULL,
  `min_limit` int(11) DEFAULT NULL,
  `max_limit` int(11) DEFAULT NULL,
  `map_key` varchar(100) DEFAULT NULL,
  `captcha_type` tinyint(4) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `configurations`
--

INSERT INTO `configurations` (`id`, `name`, `organization_name`, `domain_name`, `email`, `meta_title`, `meta_desc`, `timezone`, `author`, `sms_notification`, `email_notification`, `guest_login`, `front_end`, `slides`, `translate`, `contact`, `photo`, `currency`, `date_format`, `address`, `account_details`, `short_name`, `due_days`, `late_fees`, `language`, `dir_type`, `min_limit`, `max_limit`, `map_key`, `captcha_type`, `created`, `modified`) VALUES
(1, 'Real Estate CRM', 'Elfemo', 'http://192.168.43.69/realstatecrmpro', 'root@localhost.com', 'Real State CRM Pro', 'Real State CRM Pro', 'Asia/Kolkata', '', 0, 1, 0, 1, 1, 0, '1234567890, 1234567891', 'b692bc3fe120ce256ece89ef66afd11a.png', 21, 'd,m,Y,h,i,s,A,-,:', 'Site Office: DEMO Demo, Flat no. 101, Near Demo School, Behind Demo city mall, Demo Road, Demo, Demo (w) - 400615', '"M/s. DEMO INFRASTRACTURE PVT. LTD."(Bank Name) DEMO BANK, Demo Branch, Account No :- "005705014187"', 'ELFM', 15, 18, 'en', 1, 20, 500, '', 0, '2015-11-20 20:56:04', '2016-11-18 13:49:37');

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

--
-- Table structure for table `contents`
--

DROP TABLE IF EXISTS `contents`;
CREATE TABLE IF NOT EXISTS `contents` (
`id` int(11) NOT NULL,
  `link_name` varchar(255) DEFAULT NULL,
  `page_name` varchar(255) DEFAULT NULL,
  `page_icon` varchar(100) DEFAULT NULL,
  `is_url` varchar(8) DEFAULT 'Internal',
  `url` varchar(255) DEFAULT NULL,
  `url_target` varchar(6) DEFAULT NULL,
  `main_content` longtext,
  `page_url` varchar(255) DEFAULT NULL,
  `cols` int(11) DEFAULT NULL,
  `ordering` int(11) DEFAULT NULL,
  `views` int(11) DEFAULT '1',
  `published` varchar(11) DEFAULT 'Published',
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `contents`
--

INSERT INTO `contents` (`id`, `link_name`, `page_name`, `page_icon`, `is_url`, `url`, `url_target`, `main_content`, `page_url`, `cols`, `ordering`, `views`, `published`, `created`, `modified`) VALUES
(1, 'About Us', 'About Us', 'fa fa-newspaper-o', 'Internal', '', '_self', '<p>Perspiciatis unde omnis iste natus error sit voluptatem. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus musull dui. Lorem ipsumulum aenean noummy endrerit mauris. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus mus. Perspiciatis unde omnis iste natus error sit voluptatem. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus musull dui. Lorem ipsumulum aenean noummy endrerit mauris. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus mus. Perspiciatis unde omnis iste natus error sit voluptatem. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus musull dui. Lorem ipsumulum aenean noummy endrerit mauris. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus mus. Perspiciatis unde omnis iste natus error sit voluptatem. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus musull dui. Lorem ipsumulum aenean noummy endrerit mauris. Cum sociis natoque penatibus et magnis dis parturient montes ascetur ridiculus mus.</p>', 'About-Us', NULL, 7, 108, 'Published', '2015-10-17 13:22:14', '2016-08-06 14:10:03'),
(2, 'Contact Content', 'Contact Content', 'fa fa-map', 'Internal', '', '_self', '<div class="col-md-6"><div class="row"><div class="col-md-6"><h3 class="section-title">Office Address</h3><div class="contact-info"><h5>Address</h5><p>5th Street, Demo View - Demo States</p><h5>Email</h5><p>info@demo.com</p><h5>Phone</h5><p>+00 123 1234 123</p></div></div><div class="col-md-6"><h3 class="section-title">Timings</h3><div class="contact-info"><h5>Monday - Friday</h5><p>09:00 AM - 6:30 PM</p><h5>Saturday</h5><p>Closed</p><h5>Sunday</h5><p>Closed</p></div></div></div><h3 class="section-title">Get connected</h3><p>Lorem ipsumn qersl ioinm sersoe non urna dolor sit amet, consectetur piesn qersl ioinm sersoe non urna dolor aecena.</p></div>', 'Contact-Content', NULL, 6, 6, 'Unpublished', '2015-10-17 13:28:43', '2016-06-13 16:42:00'),
(3, 'Agents', '', 'fa fa-user', 'External', '{siteDomain}/Agents', '_self', '', 'Agents', NULL, 5, 2, 'Published', '2016-05-27 10:36:30', '2016-06-10 16:34:55'),
(4, 'Home', '', 'fa fa-home', 'External', '{siteDomain}', '_self', '', 'Home', NULL, 0, 1, 'Published', '2016-05-30 12:42:46', '2016-05-30 12:45:09'),
(5, 'Search Property', '', 'fa fa-building', 'External', '{siteDomain}/Properties', '_self', '', 'Search-Property', NULL, 1, 1, 'Published', '2016-05-30 12:48:44', '2016-05-30 13:19:21'),
(8, 'Contact Us', '', 'fa fa-map', 'External', '{siteDomain}/Contacts', '_self', '', 'Contact-Us', NULL, 8, 1, 'Published', '2016-05-30 13:40:05', '2016-06-07 15:35:57'),
(11, 'Agency', '', 'fa fa-book', 'External', '{siteDomain}/Agencies', '_self', '', 'Agency', NULL, 4, 1, 'Published', '2016-06-07 15:32:29', '2016-06-07 15:34:48');

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

--
-- Table structure for table `contracts`
--

DROP TABLE IF EXISTS `contracts`;
CREATE TABLE IF NOT EXISTS `contracts` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `contracts`
--

INSERT INTO `contracts` (`id`, `name`) VALUES
(1, 'Rent'),
(2, 'Sale'),
(3, 'Lease');

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

--
-- Table structure for table `currencies`
--

DROP TABLE IF EXISTS `currencies`;
CREATE TABLE IF NOT EXISTS `currencies` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `short` varchar(3) DEFAULT NULL,
  `photo` varchar(100) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` (`id`, `name`, `short`, `photo`) VALUES
(1, 'Australia Dollar AUD', 'AUD', '64238c6d767ab034b04c4681295567a0.gif'),
(2, 'Brunei Darussalam Dollar BND', 'BND', '53e34059e7bfe4db945404e901c4f396.gif'),
(3, 'Cambodia Riel KHR', 'KHR', 'aaa57dd0012641cdee2c8d6484db8238.gif'),
(4, 'China Yuan Renminbi CNY ', 'CNY', '5586a267c542d0f49b6c22c5c978bf23.gif'),
(5, 'Hong Kong Dollar HKD', 'HKD', '200ec0145292d85b380d8c4f570f9aa9.gif'),
(6, 'India Rupee INR', 'INR', '537f17a76864d11438d25ff5af7641a5.gif'),
(7, 'Indonesia Rupiah IDR', 'IDR', '6d27b2f196ce9d74b10d12111d9838b0.gif'),
(8, 'Japan Yen JPY', 'JPY', '3a7f86a61af62ddab4737f3df6db4807.gif'),
(9, 'Korea (North) Won KPW', 'KPW', 'cc0ad4a7ba48bedd9cf57bc4125fc2c9.gif'),
(10, 'Korea (South) Won KRW', 'KRW', '28fdcdac33f7429afe6bce2e08dd47c2.gif'),
(11, 'Laos Kip LAK', 'LAK', 'f72da580f617ee32683202aeee564df0.gif'),
(12, 'Malaysia Ringgit MYR', 'MYR', 'e86af0a98bf7398c27a5ad30319d82ad.gif'),
(13, 'Nigeria Naira NGN', 'NGN', '2cdb9ceeae309e948c6bd0a90e30ffec.gif'),
(14, 'Pakistan Rupee PKR', 'PKR', 'bac3525bb97f15f806a74d248f71d6b2.gif'),
(15, 'Philippines Peso PHP', 'PHP', 'c46c38e2701d3c3bd6ee442c93befd04.gif'),
(16, 'Singapore Dollar SGD', 'SGD', '2c1e20836f56700b13a08477216a61fb.gif'),
(17, 'Sri Lanka Rupee LKR', 'LKR', '38bb6c10813d0a1eb9c878bcea2b7570.gif'),
(18, 'Taiwan New Dollar TWD', 'TWD', 'a558976f34bf485cb72f61656595536c.gif'),
(19, 'Thailand Baht THB', 'THB', '3c3bcc74de1fd038ec2d7e0dfe2965bf.gif'),
(20, 'United Kingdom Pound GBP', 'GBP', 'df773c6ce35993089139c888ec5a3210.gif'),
(21, 'United States Dollar USD', 'USD', 'ef1e801ee13715b41e55c16886597878.gif'),
(22, 'Viet Nam Dong VND', 'VND', '5a5b143e1685239abd85f0b367d4669b.gif');

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

--
-- Table structure for table `deals`
--

DROP TABLE IF EXISTS `deals`;
CREATE TABLE IF NOT EXISTS `deals` (
`id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `properties_flat_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `invoice_no` varchar(20) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `evocate_date` date DEFAULT NULL,
  `recurring` varchar(15) DEFAULT NULL,
  `booking_amount` decimal(10,2) DEFAULT NULL,
  `discount` int(11) DEFAULT NULL,
  `total_amount` decimal(10,2) DEFAULT NULL,
  `remarks` mediumtext,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `deals`
--

INSERT INTO `deals` (`id`, `user_id`, `client_id`, `property_id`, `properties_flat_id`, `plan_id`, `invoice_no`, `date`, `evocate_date`, `recurring`, `booking_amount`, `discount`, `total_amount`, `remarks`, `created`, `modified`) VALUES
(6, 7, 56, 4, 0, 5, 'ELFM-2016-0001', '2016-11-18', NULL, 'M', '1200.00', 200, '4299800.00', 'Demo', '2016-11-18 15:46:07', '2016-11-18 15:46:07');

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

--
-- Table structure for table `deals_payments`
--

DROP TABLE IF EXISTS `deals_payments`;
CREATE TABLE IF NOT EXISTS `deals_payments` (
`id` int(11) NOT NULL,
  `receipt_no` varchar(30) DEFAULT NULL,
  `deal_id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `paymenttype_id` int(11) NOT NULL,
  `plans_payment_id` int(11) NOT NULL,
  `emi` decimal(10,2) DEFAULT NULL,
  `extra_payment` decimal(10,2) DEFAULT NULL,
  `total_amount` decimal(10,2) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `remarks` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;

--
-- Dumping data for table `deals_payments`
--

INSERT INTO `deals_payments` (`id`, `receipt_no`, `deal_id`, `property_id`, `paymenttype_id`, `plans_payment_id`, `emi`, `extra_payment`, `total_amount`, `tax_amount`, `amount`, `payment_date`, `remarks`) VALUES
(14, 'ELFM-2016-0001-0001', 6, 4, 2, 14, '1200.00', '0.00', '1200.00', '0.00', '1200.00', '2016-11-18', 'Demo'),
(15, 'ELFM-2016-0001-0015', 6, 4, 2, 15, '859720.00', '0.00', '859720.00', '0.00', '859720.00', '2016-11-18', 'Demo');

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

--
-- Table structure for table `emailsettings`
--

DROP TABLE IF EXISTS `emailsettings`;
CREATE TABLE IF NOT EXISTS `emailsettings` (
  `id` int(11) NOT NULL,
  `type` varchar(10) DEFAULT NULL,
  `host` varchar(100) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `port` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `emailsettings`
--

INSERT INTO `emailsettings` (`id`, `type`, `host`, `username`, `password`, `port`) VALUES
(1, 'Mail', NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `emailtemplates`
--

DROP TABLE IF EXISTS `emailtemplates`;
CREATE TABLE IF NOT EXISTS `emailtemplates` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `description` text,
  `status` varchar(11) DEFAULT 'Published',
  `type` varchar(3) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `emailtemplates`
--

INSERT INTO `emailtemplates` (`id`, `name`, `description`, `status`, `type`) VALUES
(1, 'Client Login Credentials', '<p>Dear $clientName,</p><p>Congratulations! Your $siteName account is now active.</p><p>Email Address : $email</p><p>Password: $password</p><p>If you need, you can reset your password at any time.</p><p>To get started, log on:<a href="$url" target="_blank">$url</a></p><p>If you have any questions or need assistance, please contact us.</p><p> </p><p>Best Regards,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'CLC'),
(2, 'Client Forgot Password', '<p>Dear $clientName,</p><p>Please click the following link to finish forgot password:</p><p><a href="$url" target="_blank">$url</a></p><p><strong>Note: If the link does not open directly, please copy and paste the url into your internet browser.</strong></p><p>Verification Code: $code</p><p>Sincerely,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'CFP'),
(3, 'Admin Forgot Password', '<p>Dear $name,</p><p>Please click the following link to finish forgot password:</p><p><a href="$url" target="_blank">$url</a></p><p><strong>Note: If the link does not open directly, please copy and paste the url into your internet browser.</strong></p><p>Verification Code: $code</p><p>Sincerely,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'AFP'),
(4, 'Admin Forgot Username', '<p>Dear $name,</p><p>You have forgot User Name. your username is $userName</p><p>Sincerely,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'AFU'),
(5, 'User Login Credentials', '<p>Dear $name,</p><p>Congratulations! Your $siteName account is now active.</p><p>Email Address : $email</p><p>Username : $userName</p><p>Password: $password</p><p>If you need, you can reset your password at any time.</p><p>To get started, log on:<a href="$url" target="_blank">$url</a></p><p>If you have any questions or need assistance, please contact us.</p><p> </p><p>Best Regards,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'ULC'),
(6, 'Payment', '<p>Dear $clientName,</p> <p>Received $currency $amount towards $paymentName paid on $date. The Recipt No. is $receiptNo</p>\r\n<p>Sincerely,</p><p>$siteName</p><p>$contactNo</p>', 'Published', 'PAY'),
(8, 'Inquiry', '<p>Dear $clientName,</p>\r\n<p>We have received your inquiry.</p>\r\n<p>If you want to activate your account in $siteName ,</p>\r\n<p>please go on to the link, <a href="http://192.168.1.100:88/order2006/admin/$url" target="_blank">$url</a>.</p>\r\n<p>Your email Id and password for $siteName is:</p>\r\n<p>Email Address : $email</p>\r\n<p>Password: $password</p>\r\n<p>Your  Verification Code: $code</p>\r\n<p>If you need, you can reset your password at any time.</p>\r\n<p>If you have any questions or need assistance, please contact us.</p>\r\n<p> </p>\r\n<p>Best Regards,</p>\r\n<p>$siteName</p>\r\n<p>$contactNo</p>', 'Published', 'INQ'),
(9, 'Property not found.', '<p>While searching the below thing/s no property was found.</p>\r\n<p>Kindly have a look on it.</p>', 'Published', 'PNF'),
(10, 'Client Registration', '<p>Hi, $memberName</p><p>Your signup email: $email</p><p>Your password: $password</p><p>Please click the following link to finish up registration:</p><p><a href="$url" target="_blank">$url</a></p><p><strong>Note: If the link does not open directly, please copy and paste the url into your internet browser.</strong></p><p>Verification Code: $code</p><p>Sincerely,</p><p>$siteName</p><p>$siteEmailContact</p>', 'Published', 'SRN'),
(11, 'Re-send Verification', '<p>Hi, $memberName</p><p>Your signup email: $email</p><p>Please click the following link to finish up registration:</p><p><a href="$url" target="_blank">$url</a></p><p><strong>Note: If the link does not open directly, please copy and paste the url into your internet browser.</strong></p><p>Verification Code: $code</p><p>Sincerely,</p><p>$siteName</p><p>$siteEmailContact</p>', 'Published', 'RVN');

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

--
-- Table structure for table `expenses`
--

DROP TABLE IF EXISTS `expenses`;
CREATE TABLE IF NOT EXISTS `expenses` (
`id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `expense_category_id` int(11) NOT NULL,
  `vendor_id` int(11) NOT NULL,
  `invoice_no` varchar(25) DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `invoice_amount` decimal(10,2) DEFAULT NULL,
  `remarks` mediumtext
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `project_id`, `expense_category_id`, `vendor_id`, `invoice_no`, `invoice_date`, `invoice_amount`, `remarks`) VALUES
(1, 7, 1, 1, 'Demo-985744', '2016-11-18', '1000.00', 'Demo');

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

--
-- Table structure for table `expenses_payments`
--

DROP TABLE IF EXISTS `expenses_payments`;
CREATE TABLE IF NOT EXISTS `expenses_payments` (
`id` int(11) NOT NULL,
  `expense_id` int(11) NOT NULL,
  `paymenttype_id` int(11) NOT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `remarks` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `expenses_payments`
--

INSERT INTO `expenses_payments` (`id`, `expense_id`, `paymenttype_id`, `amount`, `date`, `remarks`) VALUES
(1, 1, 2, '150.00', '2016-11-18', 'Demo');

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

--
-- Table structure for table `expense_categories`
--

DROP TABLE IF EXISTS `expense_categories`;
CREATE TABLE IF NOT EXISTS `expense_categories` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `status` varchar(7) DEFAULT 'Active'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `expense_categories`
--

INSERT INTO `expense_categories` (`id`, `name`, `status`) VALUES
(1, 'Salary', 'Active'),
(2, 'Cement', 'Active');

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

--
-- Table structure for table `favourites`
--

DROP TABLE IF EXISTS `favourites`;
CREATE TABLE IF NOT EXISTS `favourites` (
`id` int(11) NOT NULL,
  `client_id` int(11) DEFAULT NULL,
  `session_id` varchar(30) DEFAULT NULL,
  `property_id` int(11) NOT NULL,
  `created` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `favourites`
--

INSERT INTO `favourites` (`id`, `client_id`, `session_id`, `property_id`, `created`) VALUES
(1, 60, '06lgo01n6im6oh7pa2cdt6mbf4', 74, '2016-08-11 18:12:28');

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

--
-- Table structure for table `features`
--

DROP TABLE IF EXISTS `features`;
CREATE TABLE IF NOT EXISTS `features` (
`id` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;

--
-- Dumping data for table `features`
--

INSERT INTO `features` (`id`, `name`) VALUES
(1, 'Air Condition'),
(2, 'Cleaning'),
(3, 'Grill'),
(4, 'Pool '),
(5, 'Terrace'),
(6, 'Balcony'),
(7, 'Roof Terrace'),
(9, 'Parking'),
(10, 'Lift'),
(11, 'Cot'),
(12, 'Parquet'),
(13, 'Garden'),
(14, 'CCTV'),
(15, 'Community Center'),
(16, 'Gym'),
(17, 'Security System'),
(18, 'Childrens Play Ground');

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

--
-- Table structure for table `inventories`
--

DROP TABLE IF EXISTS `inventories`;
CREATE TABLE IF NOT EXISTS `inventories` (
`id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `expense_category_id` int(11) NOT NULL,
  `vendor_id` int(11) NOT NULL,
  `invoice_no` varchar(25) DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `invoice_qty` int(11) DEFAULT NULL,
  `remarks` mediumtext
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `inventories`
--

INSERT INTO `inventories` (`id`, `project_id`, `expense_category_id`, `vendor_id`, `invoice_no`, `invoice_date`, `invoice_qty`, `remarks`) VALUES
(1, 7, 2, 2, 'Demo-900', '2016-11-18', 50, 'Demo');

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

--
-- Table structure for table `inventories_balances`
--

DROP TABLE IF EXISTS `inventories_balances`;
CREATE TABLE IF NOT EXISTS `inventories_balances` (
`id` int(11) NOT NULL,
  `inventory_id` int(11) NOT NULL,
  `qty` int(11) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `remarks` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `inventories_balances`
--

INSERT INTO `inventories_balances` (`id`, `inventory_id`, `qty`, `date`, `remarks`) VALUES
(1, 1, 10, '2016-11-18', 'Demo');

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

--
-- Table structure for table `leads`
--

DROP TABLE IF EXISTS `leads`;
CREATE TABLE IF NOT EXISTS `leads` (
`id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `property_id` int(11) DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `status_id` int(11) NOT NULL,
  `follow_up` datetime DEFAULT NULL,
  `remarks` mediumtext
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;

--
-- Dumping data for table `leads`
--

INSERT INTO `leads` (`id`, `user_id`, `project_id`, `property_id`, `client_id`, `status_id`, `follow_up`, `remarks`) VALUES
(2, 7, 7, 3, 55, 2, '2016-08-12 00:00:00', 'sd');

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

--
-- Table structure for table `locations`
--

DROP TABLE IF EXISTS `locations`;
CREATE TABLE IF NOT EXISTS `locations` (
`id` int(11) NOT NULL,
  `name` varchar(250) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `locations`
--

INSERT INTO `locations` (`id`, `name`) VALUES
(1, 'Seville'),
(2, 'Madrid'),
(3, 'Barcelona'),
(4, 'Valencia'),
(5, 'Birbao');

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

--
-- Table structure for table `pages`
--

DROP TABLE IF EXISTS `pages`;
CREATE TABLE IF NOT EXISTS `pages` (
`id` int(11) NOT NULL,
  `model_name` varchar(100) DEFAULT NULL,
  `page_name` varchar(100) DEFAULT NULL,
  `controller_name` varchar(100) DEFAULT NULL,
  `action_name` varchar(100) DEFAULT NULL,
  `icon` varchar(40) DEFAULT NULL,
  `parent_id` int(1) DEFAULT NULL,
  `ordering` int(11) DEFAULT NULL,
  `published` varchar(3) DEFAULT 'Yes',
  `sel_name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=80 ;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`id`, `model_name`, `page_name`, `controller_name`, `action_name`, `icon`, `parent_id`, `ordering`, `published`, `sel_name`) VALUES
(1, 'Dashboard', 'Dashboard', 'Dashboards', 'index', 'fa fa-dashboard fa-fw', 0, 1, 'Yes', NULL),
(3, 'Property', 'Properties', 'Properties', 'index', 'fa fa-building-o fa-fw', 0, 5, 'Yes', 'properties_documents,properties_photos,properties_floorplans,PropertiesFloorplans'),
(4, 'Deals', 'Deals', 'Deals', 'index', 'fa fa-thumbs-up fa-fw', 0, 7, 'Yes', 'deals_payments,plans_payments,PlansPayments'),
(5, 'Leads', 'Leads', 'Leads', 'index', 'fa fa-rocket fa-fw', 0, 6, 'Yes', NULL),
(6, 'Report', 'Sales Report', 'Salesreports', 'index', NULL, 29, 2, 'Yes', NULL),
(7, 'Configuration', 'Configurations', NULL, NULL, 'fa fa-cogs fa-fw', 0, 88, 'Yes', NULL),
(9, 'Help', 'Help', 'Helps', 'index', 'fa fa-question-circle fa-fw', 0, 99, 'Yes', NULL),
(10, 'User', 'User', NULL, NULL, 'fa fa-user fa-fw', 0, 12, 'Yes', NULL),
(15, 'Invoices', 'Invoices', NULL, NULL, 'fa fa-thumb-tack fa-fw', 0, 8, 'Yes', 'Invpastdues,Invpaids'),
(16, 'Property', 'Property Photo', 'properties_photos', 'index', NULL, NULL, 99, 'Yes', NULL),
(17, 'Property', 'Property Document', 'Properties_documents', 'index', NULL, NULL, 99, 'Yes', NULL),
(18, 'Configuration', 'Tax', 'Taxes', 'index', NULL, 7, 11, 'Yes', NULL),
(19, 'Configuration', 'Payment Type', 'Paymenttypes', 'index', NULL, 7, 8, 'Yes', NULL),
(20, 'Expense / Inventory', 'Category', 'expense_categories', 'index', NULL, 21, 1, 'Yes', NULL),
(21, 'Expense / Inventory', 'Expense / Inventory', NULL, NULL, 'fa fa-shopping-cart', 0, 11, 'Yes', 'expenses_payments,inventories_balances'),
(22, 'Report', 'Expense Report', 'Expensereports', 'index', NULL, 29, 3, 'Yes', NULL),
(23, 'Report', 'Profit Report', 'Profitreports', 'index', NULL, 29, 4, 'Yes', NULL),
(25, 'Purchase', 'Purchase', 'Purchases', 'index', 'fa fa-shopping-cart fa-fw', 0, 4, 'Yes', 'purchases_payments'),
(26, 'Report', 'Purchase Report', 'Purchasereports', 'index', NULL, 29, 1, 'Yes', NULL),
(27, 'Purchase', 'Purchase Payment', 'purchases_payments', 'index', NULL, 25, 99, 'No', NULL),
(28, 'Vendor / Staff', 'Vendor / Staff', 'Vendors', 'index', NULL, 21, 2, 'Yes', NULL),
(29, 'Reports', 'Reports', NULL, NULL, 'fa fa-table fa-fw', 0, 9, 'Yes', NULL),
(30, 'Configuration', 'General', 'Configurations', 'index', NULL, 7, 1, 'Yes', NULL),
(31, 'Expense / Inventory', 'Expenses', 'Expenses', 'index', NULL, 21, 3, 'Yes', NULL),
(32, 'Configuration', 'Currency', 'Currencies', 'index', NULL, 7, 4, 'Yes', NULL),
(33, 'Expense / Inventory', 'Expenses Payments', 'expenses_payments', 'index', NULL, 21, 99, 'No', NULL),
(34, 'Deals', 'Deals Payments', 'deals_payments', 'index', NULL, 4, 99, 'No', NULL),
(35, 'Configuration', 'Units', 'Units', 'index', NULL, 7, 13, 'Yes', NULL),
(37, 'User', 'Agents', 'Agents', 'index', NULL, 10, 3, 'Yes', 'awallet_histories'),
(38, 'Configuration', 'Plans', 'Plans', 'index', NULL, 7, 9, 'Yes', NULL),
(39, 'Deal', 'Plan Payments', 'PlansPayments', 'index', NULL, NULL, 99, 'No', NULL),
(41, 'Configuration', 'Organisation Logo', 'Weblogos', 'index', NULL, 7, 2, 'Yes', NULL),
(42, 'Invoices', 'Balance Invoices', 'Invpastdues', 'index', NULL, 15, 1, 'Yes', NULL),
(43, 'Invoices', 'Paid Invoices', 'Invpaids', 'index', NULL, 15, 2, 'Yes', NULL),
(44, 'Email & SMS', 'Email & SMS', NULL, NULL, 'fa fa-shield', 0, 10, 'Yes', NULL),
(45, 'Email & SMS', 'Email Settings', 'Emailsettings', 'index', NULL, 44, 1, 'Yes', NULL),
(46, 'Email & SMS', 'Email Templates', 'Emailtemplates', 'index', NULL, 44, 2, 'Yes', NULL),
(47, 'Email & SMS', 'Send Emails', 'Sendemails', 'index', NULL, 44, 3, 'Yes', NULL),
(48, 'Email & SMS', 'SMS Setting', 'Smssettings', 'index', NULL, 44, 4, 'Yes', NULL),
(49, 'Email & SMS', 'SMS Templates', 'Smstemplates', 'index', NULL, 44, 5, 'Yes', NULL),
(50, 'Email & SMS', 'Send SMS', 'Sendsms', 'index', NULL, 44, 6, 'Yes', NULL),
(51, 'Content', 'Contents', NULL, NULL, 'fa fa-newspaper-o', 0, 15, 'Yes', NULL),
(52, 'Content', 'Pages', 'Contents', 'index', NULL, 51, 1, 'Yes', NULL),
(53, 'Content', 'Slides', 'Slides', 'index', NULL, 51, 2, 'Yes', NULL),
(54, 'Expense / Inventory', 'Inventory', 'Inventories', 'index', NULL, 21, 4, 'Yes', 'inventories_balances'),
(55, 'Expense / Inventory', 'Inventories Entry', 'inventories_balances', 'index', NULL, 21, 99, 'No', NULL),
(56, 'Configuration', 'Category', 'Categories', 'index', NULL, 7, 4, 'Yes', NULL),
(57, 'Contact', 'Contacts', 'Contacts', 'index', 'fa fa-users fa-fw', 0, 3, 'Yes', NULL),
(58, 'Configuration', 'Location', 'Locations', 'index', '', 7, 7, 'Yes', NULL),
(60, 'Configuration', 'Feature', 'Features', 'index', '', 7, 6, 'Yes', NULL),
(61, 'Configuration', 'Status', 'Statuses', 'index', NULL, 7, 9, 'Yes', NULL),
(62, 'Configuration', 'Type', 'Types', 'index', NULL, 7, 12, 'Yes', NULL),
(63, 'User', 'Agency', 'Agencies', 'index', NULL, 10, 2, 'Yes', NULL),
(64, 'Configuration', 'Contract', 'Contracts', 'index', NULL, 7, 5, 'Yes', NULL),
(65, 'None', NULL, '#', NULL, NULL, 0, 100, 'Yes', NULL),
(66, 'None1', NULL, '#', NULL, NULL, 0, 101, 'Yes', NULL),
(67, 'Templates', 'Templates', 'Templates', 'index', NULL, 7, 3, 'Yes', NULL),
(68, 'Report', 'Search History', 'Searchhistories', 'index', NULL, 29, 5, 'Yes', NULL),
(69, 'Property', 'Property Floor Plan', 'properties_floorplans', 'index', NULL, NULL, 99, 'Yes', NULL),
(70, 'Calendar', 'Calendar Schedules', 'Calendars', 'index', 'fa fa-calendar', 0, 2, 'Yes', NULL),
(71, 'Configuration', 'Level User', 'Users', 'assignrights', NULL, 7, 7, 'Yes', NULL),
(72, 'User', 'Agent Wallet History', 'awallet_histories', 'index', NULL, 10, 4, 'Yes', NULL),
(73, 'Deals', 'Plans Payment', 'plans_payments', 'index', 'fa fa-money', NULL, 99, 'Yes', NULL),
(75, 'Deals', 'Deals Payment', 'deals_payments', 'index', NULL, NULL, 99, 'Yes', NULL),
(76, 'Purchase', 'Purchase Payment', 'purchases_payments', 'index', NULL, NULL, 99, 'Yes', NULL),
(77, 'User', 'System User', 'Users', 'index', NULL, 10, 1, 'Yes', NULL),
(78, 'Expense / Inventory', 'Expenses Payments', 'expenses_payments', 'index', NULL, NULL, 99, 'Yes', NULL),
(79, 'Expense / Inventory', 'Inventories Balances', 'inventories_balances', 'index', NULL, NULL, 99, 'Yes', NULL);

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

--
-- Table structure for table `page_rights`
--

DROP TABLE IF EXISTS `page_rights`;
CREATE TABLE IF NOT EXISTS `page_rights` (
`id` int(11) NOT NULL,
  `page_id` int(11) NOT NULL,
  `ugroup_id` int(11) NOT NULL,
  `save_right` int(1) DEFAULT NULL,
  `update_right` int(1) DEFAULT NULL,
  `view_right` int(1) DEFAULT NULL,
  `search_right` int(1) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=394 ;

--
-- Dumping data for table `page_rights`
--

INSERT INTO `page_rights` (`id`, `page_id`, `ugroup_id`, `save_right`, `update_right`, `view_right`, `search_right`) VALUES
(211, 1, 3, NULL, NULL, 1, NULL),
(212, 3, 3, NULL, NULL, 1, NULL),
(213, 16, 3, NULL, NULL, 1, NULL),
(214, 17, 3, NULL, NULL, 1, NULL),
(215, 69, 3, NULL, NULL, 1, NULL),
(317, 72, 2, NULL, NULL, 1, NULL),
(318, 70, 2, NULL, NULL, 1, NULL),
(319, 57, 2, NULL, NULL, 1, NULL),
(320, 1, 2, NULL, NULL, 1, NULL),
(321, 5, 2, NULL, NULL, 1, NULL),
(322, 3, 2, NULL, NULL, 1, NULL),
(323, 16, 2, NULL, NULL, 1, NULL),
(324, 17, 2, NULL, NULL, 1, NULL),
(325, 69, 2, NULL, NULL, 1, NULL),
(359, 70, 4, NULL, NULL, 1, NULL),
(360, 57, 4, NULL, NULL, 1, NULL),
(361, 1, 4, NULL, NULL, 1, NULL),
(362, 4, 4, NULL, NULL, 1, NULL),
(363, 73, 4, NULL, NULL, 1, NULL),
(364, 75, 4, NULL, NULL, 1, NULL),
(365, 44, 4, NULL, NULL, 1, NULL),
(366, 47, 4, NULL, NULL, 1, NULL),
(367, 50, 4, NULL, NULL, 1, NULL),
(368, 21, 4, NULL, NULL, 1, NULL),
(369, 31, 4, NULL, NULL, 1, NULL),
(370, 54, 4, NULL, NULL, 1, NULL),
(371, 78, 4, NULL, NULL, 1, NULL),
(372, 79, 4, NULL, NULL, 1, NULL),
(373, 9, 4, NULL, NULL, 1, NULL),
(374, 15, 4, NULL, NULL, 1, NULL),
(375, 42, 4, NULL, NULL, 1, NULL),
(376, 43, 4, NULL, NULL, 1, NULL),
(377, 5, 4, NULL, NULL, 1, NULL),
(378, 3, 4, NULL, NULL, 1, NULL),
(379, 16, 4, NULL, NULL, 1, NULL),
(380, 17, 4, NULL, NULL, 1, NULL),
(381, 69, 4, NULL, NULL, 1, NULL),
(382, 25, 4, NULL, NULL, 1, NULL),
(383, 76, 4, NULL, NULL, 1, NULL),
(384, 6, 4, NULL, NULL, 1, NULL),
(385, 22, 4, NULL, NULL, 1, NULL),
(386, 23, 4, NULL, NULL, 1, NULL),
(387, 26, 4, NULL, NULL, 1, NULL),
(388, 68, 4, NULL, NULL, 1, NULL),
(389, 29, 4, NULL, NULL, 1, NULL),
(390, 10, 4, NULL, NULL, 1, NULL),
(391, 37, 4, NULL, NULL, 1, NULL),
(392, 72, 4, NULL, NULL, 1, NULL),
(393, 28, 4, NULL, NULL, 1, NULL);

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

--
-- Table structure for table `paymenttypes`
--

DROP TABLE IF EXISTS `paymenttypes`;
CREATE TABLE IF NOT EXISTS `paymenttypes` (
`id` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `paymenttypes`
--

INSERT INTO `paymenttypes` (`id`, `name`) VALUES
(1, 'Bank Transfer'),
(2, 'Cash'),
(3, 'Cheque'),
(4, 'PayPal'),
(5, 'Debit Card');

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

--
-- Table structure for table `plans`
--

DROP TABLE IF EXISTS `plans`;
CREATE TABLE IF NOT EXISTS `plans` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `installment` int(11) DEFAULT NULL,
  `status` varchar(7) NOT NULL DEFAULT 'Active'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ;

--
-- Dumping data for table `plans`
--

INSERT INTO `plans` (`id`, `name`, `installment`, `status`) VALUES
(1, '1 Installment', 1, 'Active'),
(2, '2 Installment', 2, 'Active'),
(3, '3 Installment', 3, 'Active'),
(4, '4 Installment', 4, 'Active'),
(5, '5 Installment', 5, 'Active'),
(6, '6 Installment', 6, 'Active'),
(7, '7 Installment', 7, 'Active'),
(8, '8 Installment', 8, 'Active'),
(9, '9 Installment', 9, 'Active'),
(10, '10 Installment', 10, 'Active'),
(11, '11 Installment', 11, 'Active'),
(12, '12 Installment', 12, 'Active'),
(13, '13 Installment', 13, 'Active'),
(14, '14 Installment', 14, 'Active'),
(15, '15 Installment', 15, 'Active'),
(16, '16 Installment', 16, 'Active'),
(17, '17 Installment', 17, 'Active'),
(18, '18 Installment', 18, 'Active'),
(19, '19 Installment', 19, 'Active'),
(20, '20 Installment', 20, 'Active'),
(21, '21 Installment', 21, 'Active'),
(22, '22 Installment', 22, 'Active'),
(23, '23 Installment', 23, 'Active'),
(24, '24 Installment', 24, 'Active'),
(25, '25 Installment', 25, 'Active'),
(26, '26 Installment', 26, 'Active'),
(27, '27 Installment', 27, 'Active'),
(28, '28 Installment', 28, 'Active'),
(29, '29 Installment', 29, 'Active'),
(30, '30 Installment', 30, 'Active'),
(31, '31 Installment', 31, 'Active'),
(32, '32 Installment', 32, 'Active'),
(33, '33 Installment', 33, 'Active'),
(34, '34 Installment', 34, 'Active'),
(35, '35 Installment', 35, 'Active'),
(36, '36 Installment', 36, 'Active'),
(37, '37 Installment', 37, 'Active'),
(38, '38 Installment', 38, 'Active'),
(39, '39 Installment', 39, 'Active'),
(41, '40 Installment', 40, 'Active');

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

--
-- Table structure for table `plans_payments`
--

DROP TABLE IF EXISTS `plans_payments`;
CREATE TABLE IF NOT EXISTS `plans_payments` (
`id` int(11) NOT NULL,
  `deal_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `date` date DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;

--
-- Dumping data for table `plans_payments`
--

INSERT INTO `plans_payments` (`id`, `deal_id`, `name`, `amount`, `date`) VALUES
(14, 6, 'Booking Amount', 1200, '2016-11-18'),
(15, 6, '1 Installment', 859720, '2016-12-18'),
(16, 6, '2 Installment', 859720, '2017-01-18'),
(17, 6, '3 Installment', 859720, '2017-02-18'),
(18, 6, '4 Installment', 859720, '2017-03-18'),
(19, 6, '5 Installment', 859720, '2017-04-18');

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

--
-- Table structure for table `projects`
--

DROP TABLE IF EXISTS `projects`;
CREATE TABLE IF NOT EXISTS `projects` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `name`, `phone`, `mobile`, `email`) VALUES
(7, 'Elfemo', '0000000000', '000000001', 'demoagent@gmail.com'),
(9, 'Agency A', '0000000000', '0000000000', 'agencya@gmail.com');

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

--
-- Table structure for table `properties`
--

DROP TABLE IF EXISTS `properties`;
CREATE TABLE IF NOT EXISTS `properties` (
`id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `uniq_id` varchar(11) DEFAULT NULL,
  `project_id` int(11) DEFAULT NULL,
  `location_id` int(11) DEFAULT NULL,
  `contract_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `unit_id` int(11) DEFAULT NULL,
  `name` varchar(150) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `description` text,
  `area` int(11) DEFAULT NULL,
  `price` int(20) DEFAULT NULL,
  `agent_commission` int(11) DEFAULT NULL,
  `commission_type` varchar(10) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bedroom` int(11) DEFAULT NULL,
  `bathroom` int(11) DEFAULT NULL,
  `rating` float DEFAULT NULL,
  `rating_count` int(11) DEFAULT NULL,
  `rating_users` int(11) DEFAULT NULL,
  `latitude` varchar(20) DEFAULT NULL,
  `longitude` varchar(20) DEFAULT NULL,
  `video` varchar(250) DEFAULT NULL,
  `views` int(11) DEFAULT NULL,
  `allow_rating` varchar(3) NOT NULL DEFAULT 'Yes',
  `allow_comment` varchar(3) NOT NULL DEFAULT 'Yes',
  `status` varchar(10) DEFAULT 'Available',
  `featured` varchar(3) DEFAULT 'No',
  `published` varchar(3) NOT NULL DEFAULT 'Yes',
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=90 ;

--
-- Dumping data for table `properties`
--

INSERT INTO `properties` (`id`, `user_id`, `uniq_id`, `project_id`, `location_id`, `contract_id`, `type_id`, `unit_id`, `name`, `address`, `description`, `area`, `price`, `agent_commission`, `commission_type`, `floor`, `bedroom`, `bathroom`, `rating`, `rating_count`, `rating_users`, `latitude`, `longitude`, `video`, `views`, `allow_rating`, `allow_comment`, `status`, `featured`, `published`, `created`, `modified`) VALUES
(1, 2, 'ELFM7F58BE', 9, 2, 2, 5, 1, 'Custom Ocean View Home in Tango Mar, Tambor', 'Mexico City, Mexico', '<div>\r\n<div>\r\n<div>\r\n<p>Motivated Seller ! </p>\r\n<p>Steps from the tropical beach and waterfall of Tango Mar.</p>\r\n</div>\r\n</div>\r\n</div>\r\n<div>\r\n<div>\r\n<div>\r\n<p>Located in one of the most exclusive beach front residential communities on the Nicoya Peninsula, sits this incredible custom designed home. The amazing home was built on a acre (3,000 m2) ocean view lot, inside the Tango Mar resort and beach community.</p>\r\n<p>The home features 3,750 sq ft of under roof construction, and over 4,500 sq ft of out door decking and terrace area! Needless to say the focal point of the home is the out door space, pool bar, BBQ area, and ocean view terraces.<br /> The interior of this spacious home features 5 bdrms and 3.5 bath rooms, plus a office area with a Murphy Bed, so the room could also be used as a additional guest room. The entire home features a combination of hard wood floors upstairs, and marble floors on the lower level.</p>\r\n<p>The main floor includes the formal dining area, and a incredible gourmet kitchen, with all state of the art appliances, and hand carved wooden cabinetry. A entertainment center, complete with large flat screen TV, surround sound and home theater audio flow from the kitchen area out to the entertainment section of the home.<br /> The lower level features 2 bdrm and a kitchenette, all of which open up and out to the enormous oversize swimming pool and deck area, which have been finished in corralina stone which is heat proof and a non slip surface. </p>\r\n<p>The large and tropically landscaped yard features lighting throughout, and is spectacular at night, providing a subtle and elegant atmosphere for out door entertaining and relaxing.<br /> The property also features a 2 bdrm, 1 bath guest house / pool house, just adjacent to the swimming pool and BBQ area, this house also features ocean view.</p>\r\n<p>The home is for sale totally turn key and includes everything furniture, decorations, appliances, kitchen accessories, ectand would be a perfect full time residence, or to be used as a high end tropical rental or retreat for large families or groups.</p>\r\n<p>The property also features a care takers apartment, perfect for a couple who can live on site and take care of maintenance, gardening and house hold cleaning full time.</p>\r\n</div>\r\n</div>\r\n</div>', 250, 1050000, NULL, 'Percentage', 3, 3, 2, 3.8, 123, 32, '19.4326077', '-99.13320799999997', '', 294, 'Yes', '1', 'Available', 'Yes', 'Yes', '2016-05-25 20:13:55', '2016-11-18 12:20:46'),
(2, 2, 'ELFM025BCA', 7, 3, 2, 3, 1, 'Sunshine', 'New York, NY, United States', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at mi ac nisl tempor rhoncus. Nulla luctus nisi in vehicula vestibulum. Fusce ante urna, blandit feugiat lobortis ut, hendrerit quis velit. Sed nec ultrices ligula. Etiam vel porttitor erat. Quisque gravida magna non vehicula auctor. In mollis leo id semper porta.', 150, 100000, 15, 'Percentage', 2, 4, 2, NULL, NULL, NULL, '40.7127837', '-74.00594130000002', '', 76, '1', '1', 'Available', 'Yes', 'Yes', '2016-05-28 11:15:16', '2016-11-18 12:20:46'),
(3, 2, 'ELFM6569FC', 7, 2, 2, 6, 1, 'Earth Reality', 'San Fernando, Buenos Aires Province, Argentina', 'Nulla vitae tristique felis. Vestibulum mollis sodales lectus sed iaculis. Fusce hendrerit malesuada magna nec ornare. Aliquam vehicula vestibulum dui, eu facilisis justo blandit et. Quisque congue laoreet lacus, a pulvinar elit ornare ut. Nullam faucibus bibendum volutpat. Nam quis aliquam quam, eget viverra eros. Praesent dignissim dolor quis porta aliquam. Etiam eleifend tempus nisl. Curabitur id rutrum metus, a tincidunt nisl. Aliquam vitae porta arcu, nec blandit ex. Maecenas vel maximus ante, a vulputate odio. Proin quis nisi enim.', 150, 1800000, 12000, 'Value', 5, 4, 2, NULL, NULL, NULL, '-34.4430618', '-58.55796429999998', '', 124, '0', '0', 'Available', 'Yes', 'Yes', '2016-06-04 15:43:15', '2016-11-18 12:20:46'),
(4, 7, 'ELFM004E65', 7, 4, 2, 5, 2, 'Mc Grath', '7 Lower Fort Street, Millers Point, NSW, 2000, Australia', '<p>Part of the landmark ''Milton Terrace'' row of terraces, ''Myhree'' c1879-1880 is a Victorian classical mansion with inspired harbour and Opera House views. It offers scope for restoration into a stately home, a short walk from Barangaroo Reserve and The Rocks.<br/><br/><span>- Traditional living and dining rooms with original fireplaces</span><br/><span >- Generous rear garden with level lawn, lush leafy forecourt</span><br  /><span >- Formerly a boarding house offering multiple accommodation</span><br/><span >- Six good sized bedrooms, gas kitchenettes, three bathrooms</span><br /><span>- Opposite reserve parklands, wide front balcony, high ceilings</span><br/><span>- Occupies 206.7sqm block with approx 5.7 metre wide street frontage</span><br/><span>- Large basement level with the benefit of separate access</span><br /><span>- Stroll to Circular Quay, Walsh Bay and acclaimed theatres</span><br/><span>- Moments to fine dining, historic pubs, caf and schools</span><!--EndFragment--></p>', 206, 4300000, NULL, '', 1, 6, 3, NULL, NULL, NULL, '-33.8555307', '151.20790369999997', '', 6, '0', '0', 'Sold', 'Yes', 'Yes', '2016-06-16 12:03:14', '2016-11-18 15:46:07'),
(5, 11, 'ELFM06E7C8', 9, 1, 2, 1, 1, 'Pacific Line', 'Demonte Colony, Chennai, Tamil Nadu, India', 'This is best Deal', 100, 1200, 1, 'Percentage', 3, 2, 2, NULL, NULL, NULL, '13.0298493', '80.25269270000001', '', 29, '1', '1', 'Available', 'Yes', 'Yes', '2016-07-26 12:05:10', '2016-11-18 12:23:53'),
(6, 11, 'ELFM064112', 9, 5, 2, 3, 1, 'Green valley', 'Assam, India', '', 80, 9800000, 13, 'Percentage', 3, 3, 3, NULL, NULL, NULL, '26.2006043', '92.93757389999996', '', 2, '0', '0', 'Available', 'No', 'Yes', '2016-11-16 17:44:48', '2016-11-18 12:20:46');

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

--
-- Table structure for table `properties_documents`
--

DROP TABLE IF EXISTS `properties_documents`;
CREATE TABLE IF NOT EXISTS `properties_documents` (
`id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `dir` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `properties_features`
--

DROP TABLE IF EXISTS `properties_features`;
CREATE TABLE IF NOT EXISTS `properties_features` (
`id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `feature_id` int(11) NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1081 ;

--
-- Dumping data for table `properties_features`
--

INSERT INTO `properties_features` (`id`, `property_id`, `feature_id`) VALUES
(1080, 1, 5),
(1077, 1, 9),
(1076, 1, 10),
(1078, 1, 12),
(1075, 1, 14),
(1079, 1, 17),
(1074, 2, 18),
(1071, 3, 1),
(1073, 3, 9),
(1072, 3, 13),
(1066, 4, 1),
(1069, 4, 4),
(1068, 4, 9),
(1067, 4, 13),
(1070, 4, 17),
(1063, 5, 3),
(1064, 5, 9),
(1065, 5, 12),
(1059, 6, 1),
(1061, 6, 2),
(1062, 6, 5),
(1060, 6, 6);

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

--
-- Table structure for table `properties_floorplans`
--

DROP TABLE IF EXISTS `properties_floorplans`;
CREATE TABLE IF NOT EXISTS `properties_floorplans` (
`id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `dir` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `properties_floorplans`
--

INSERT INTO `properties_floorplans` (`id`, `property_id`, `photo`, `dir`) VALUES
(2, 1, '2016-05-26-23435.jpg', 'propertiesfloorplans'),
(3, 1, '2016-05-26-10262.jpg', 'propertiesfloorplans'),
(9, 3, '2016-06-15-15350.jpg', 'propertiesfloorplans'),
(10, 4, '2016-06-16-2773.jpg', 'propertiesfloorplans');

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

--
-- Table structure for table `properties_photos`
--

DROP TABLE IF EXISTS `properties_photos`;
CREATE TABLE IF NOT EXISTS `properties_photos` (
`id` int(11) NOT NULL,
  `property_id` int(11) NOT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `dir` varchar(255) DEFAULT NULL,
  `home` varchar(3) DEFAULT 'No'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=127 ;

--
-- Dumping data for table `properties_photos`
--

INSERT INTO `properties_photos` (`id`, `property_id`, `photo`, `dir`, `home`) VALUES
(81, 1, '2016-05-26-24222.jpg', 'propertiesphotos', 'Yes'),
(82, 1, '2016-05-26-7551.jpg', 'propertiesphotos', 'No'),
(83, 1, '2016-05-26-29004.jpg', 'propertiesphotos', 'No'),
(84, 1, '2016-05-26-5525.jpg', 'propertiesphotos', 'No'),
(85, 1, '2016-05-26-18090.jpg', 'propertiesphotos', 'No'),
(86, 1, '2016-05-26-4763.jpg', 'propertiesphotos', 'No'),
(87, 1, '2016-05-26-22072.jpg', 'propertiesphotos', 'No'),
(88, 1, '2016-05-26-30225.jpg', 'propertiesphotos', 'No'),
(89, 1, '2016-05-26-9078.jpg', 'propertiesphotos', 'No'),
(90, 1, '2016-05-26-30909.jpg', 'propertiesphotos', 'No'),
(91, 1, '2016-05-26-11954.jpg', 'propertiesphotos', 'No'),
(92, 1, '2016-05-26-19971.jpg', 'propertiesphotos', 'No'),
(108, 3, '2016-06-16-2067.jpg', 'propertiesphotos', 'Yes'),
(109, 3, '2016-06-16-17548.jpg', 'propertiesphotos', 'No'),
(110, 2, '2016-06-16-27216.jpg', 'propertiesphotos', 'No'),
(111, 4, '2016-06-16-9753.jpg', 'propertiesphotos', 'No'),
(112, 4, '2016-06-16-1758.jpg', 'propertiesphotos', 'No'),
(113, 4, '2016-06-16-16575.jpg', 'propertiesphotos', 'No'),
(114, 4, '2016-06-16-29580.jpg', 'propertiesphotos', 'No'),
(119, 6, '2016-11-16-5219.jpg', 'propertiesphotos', 'No'),
(126, 5, '2016-11-18-10480.jpg', 'propertiesphotos', 'No');

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

--
-- Table structure for table `purchases`
--

DROP TABLE IF EXISTS `purchases`;
CREATE TABLE IF NOT EXISTS `purchases` (
`id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `mobile` varchar(25) DEFAULT NULL,
  `property_name` varchar(100) DEFAULT NULL,
  `description` mediumtext,
  `area` varchar(25) DEFAULT NULL,
  `unit_id` int(11) NOT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `remarks` mediumtext
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `purchases`
--

INSERT INTO `purchases` (`id`, `project_id`, `name`, `address`, `mobile`, `property_name`, `description`, `area`, `unit_id`, `amount`, `remarks`) VALUES
(1, 7, 'Party A', 'Demo', '00', 'Demo Property', 'Demo', '12000', 1, '5000.00', 'Demo 1');

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

--
-- Table structure for table `purchases_payments`
--

DROP TABLE IF EXISTS `purchases_payments`;
CREATE TABLE IF NOT EXISTS `purchases_payments` (
`id` int(11) NOT NULL,
  `purchase_id` int(11) NOT NULL,
  `paymenttype_id` int(11) NOT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `remarks` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `purchases_payments`
--

INSERT INTO `purchases_payments` (`id`, `purchase_id`, `paymenttype_id`, `amount`, `date`, `remarks`) VALUES
(1, 1, 2, '100.00', '2016-11-18', 'Demo');

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

--
-- Table structure for table `search_histories`
--

DROP TABLE IF EXISTS `search_histories`;
CREATE TABLE IF NOT EXISTS `search_histories` (
`id` int(11) NOT NULL,
  `name` text,
  `link` text,
  `search` char(1) DEFAULT NULL,
  `ip_address` varchar(50) DEFAULT NULL,
  `created` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `slides`
--

DROP TABLE IF EXISTS `slides`;
CREATE TABLE IF NOT EXISTS `slides` (
`id` int(11) NOT NULL,
  `slide_name` varchar(255) DEFAULT NULL,
  `ordering` int(11) DEFAULT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `dirt` varchar(255) DEFAULT NULL,
  `status` varchar(7) DEFAULT 'Active',
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `slides`
--

INSERT INTO `slides` (`id`, `slide_name`, `ordering`, `photo`, `dirt`, `status`, `created`, `modified`) VALUES
(1, 'slide1', 1, '0a2b09cf329f3b177d997398ededba0a.jpg', 'slides', 'Active', '2015-10-12 17:00:49', '2015-10-17 15:04:17'),
(2, 'slide2', 2, '3090d16785bae618a1be70bbaa9c680a.jpg', 'slides', 'Active', '2015-10-12 17:29:10', '2015-10-17 12:26:18'),
(3, 'slide3', 3, '4c89e0e117cf6b0932f74f4f48baaf53.jpg', 'slides', 'Active', '2015-10-12 17:29:27', '2015-10-17 12:26:18'),
(4, 'slide4', 4, '54f64780f5841840afa3071fb98cd323.jpg', 'slides', 'Active', '2015-10-12 17:29:44', '2015-10-17 15:04:17'),
(5, 'slide5', 5, '93ce6ac92a82094ecb3a7c47fcabdfdf.jpg', 'slides', 'Active', '2016-06-10 16:38:13', '2016-06-15 15:45:33');

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

--
-- Table structure for table `smssettings`
--

DROP TABLE IF EXISTS `smssettings`;
CREATE TABLE IF NOT EXISTS `smssettings` (
`id` int(11) NOT NULL,
  `api` varchar(255) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `senderid` varchar(10) DEFAULT NULL,
  `husername` varchar(100) DEFAULT NULL,
  `hpassword` varchar(100) DEFAULT NULL,
  `hsenderid` varchar(100) DEFAULT NULL,
  `hmobile` varchar(100) DEFAULT NULL,
  `hmessage` varchar(100) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `smssettings`
--

INSERT INTO `smssettings` (`id`, `api`, `username`, `password`, `senderid`, `husername`, `hpassword`, `hsenderid`, `hmobile`, `hmessage`, `type`) VALUES
(1, '', '', '', '', '', '', '', '', '', 'Get');

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

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

DROP TABLE IF EXISTS `smstemplates`;
CREATE TABLE IF NOT EXISTS `smstemplates` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `description` text,
  `status` varchar(11) DEFAULT 'Published',
  `type` varchar(3) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `smstemplates`
--

INSERT INTO `smstemplates` (`id`, `name`, `description`, `status`, `type`) VALUES
(1, 'Client Login Credentials', 'Dear $clientName, Your $siteName account is now active. Email: $email Password: $password Website:$url Best Regards, $siteName', 'Published', 'CLC'),
(2, 'Client Forgot Password', 'Dear $clientName, Website: $url Verification Code: $code Sincerely, $siteName', 'Published', 'CFP'),
(3, 'Admin Forgot Password', 'Dear $name, Website: $url Verification Code: $code Sincerely, $siteName', 'Published', 'AFP'),
(4, 'Admin Forgot Username', 'Dear $name, You have forgot User Name. Your username is $userName Sincerely, $siteName', 'Published', 'AFU'),
(5, 'User Login Credentials', 'Dear $name, Your $siteName account is now active. Email: $email Uername: $userName Password: $password Website:$url Best Regards, $siteName', 'Published', 'ULC'),
(6, 'Invoice Demand Letter', 'Dear $clientName You Payment is due on $dueDate. Please pay your amount Rs. $amount Plus Service Tax amount. Sincerely, $siteName', 'Published', 'IDL'),
(7, 'Payment', 'Dear $clientName, Received $currency $amount towards $paymentName paid on $date. The Recipt No. is $receiptNo', 'Published', 'PAY'),
(8, 'Client Registration', 'Hi, $memberName Email: $email Password: $password Website: $url Verification Code: $code Sincerely, $siteName', 'Published', 'SRN'),
(9, 'Re-send Verification', 'Hi, $memberName Email: $email Website: $url Verification Code: $code Sincerely, $siteName', 'Published', 'RVN'),
(10, 'Inquiry', 'Dear $clientName, We have received your inquiry. Email: $email Password: $password Website: $url Verification Code: $code Sincerely, $siteName', 'Published', 'INQ');

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

--
-- Table structure for table `statuses`
--

DROP TABLE IF EXISTS `statuses`;
CREATE TABLE IF NOT EXISTS `statuses` (
`id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `color` varchar(15) DEFAULT NULL,
  `type` varchar(3) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `statuses`
--

INSERT INTO `statuses` (`id`, `name`, `color`, `type`) VALUES
(1, 'New', '#428bca', 'NEW'),
(2, 'In Process ', '#5cb85c', NULL),
(3, 'Cancelled', '#d9534f', NULL);

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

--
-- Table structure for table `taxes`
--

DROP TABLE IF EXISTS `taxes`;
CREATE TABLE IF NOT EXISTS `taxes` (
`id` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `percent` decimal(4,2) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `taxes`
--

INSERT INTO `taxes` (`id`, `name`, `percent`) VALUES
(1, 'VAT+SAT', '15.00');

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

--
-- Table structure for table `templates`
--

DROP TABLE IF EXISTS `templates`;
CREATE TABLE IF NOT EXISTS `templates` (
`id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` longtext,
  `type` varchar(100) DEFAULT NULL,
  `status` varchar(11) NOT NULL DEFAULT 'Published',
  `is_new` varchar(3) NOT NULL DEFAULT 'Yes'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `templates`
--

INSERT INTO `templates` (`id`, `name`, `description`, `type`, `status`, `is_new`) VALUES
(1, 'Property Print Template', '<table width="960" border="0" cellpadding="4" cellspacing="4">\r\n<tr>\r\n<td colspan="2"><h2>Property Name : $propertyName</h2></td>\r\n</tr>\r\n<tr>\r\n<td colspan="2">\r\n$propertyPhoto\r\n</td>\r\n</tr>\r\n<tr >\r\n<td ><strong>Agency :</strong> $agencyName</td>\r\n<td ><strong> Location:</strong> $locationName</td>\r\n</tr>\r\n<tr>\r\n<td ><strong> Contract:</strong> $contractName</td>\r\n<td ><strong> Price:</strong>$propertyPrice</td>\r\n</tr>\r\n<tr >\r\n<td ><strong>Status :</strong>$propertyStatus</td>\r\n<td ><strong> Bedrooms:</strong>$propertyBedroom</td>\r\n</tr>\r\n<tr>\r\n<td ><strong> Bathrooms:</strong>$propertyBathroom</td>\r\n<td ><strong> Area:</strong>$propertyArea</td>\r\n</tr>\r\n<tr >\r\n<td colspan="2"><strong> Agent:</strong>$propertyAgent</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<strong>Features</strong>\r\n</td>\r\n<td >\r\n$feature \r\n</td>\r\n</tr>\r\n<tr>\r\n<td colspan="2"><strong>Description :</strong>$propertyDescription</td>\r\n</tr>\r\n\r\n</table>', 'PRO', 'Published', 'No'),
(2, 'Email Property', '<table width="960" border="0" cellpadding="4" cellspacing="4">\r\n<tr>\r\n<td colspan="2"><h2>Property Name : $propertyName</h2></td>\r\n</tr>\r\n<tr>\r\n<td colspan="2">\r\n$propertyPhoto\r\n</td>\r\n</tr>\r\n<tr >\r\n<td ><strong>Agency :</strong> $agencyName</td>\r\n<td ><strong> Location:</strong> $locationName</td>\r\n</tr>\r\n<tr>\r\n<td ><strong> Contract:</strong> $contractName</td>\r\n<td ><strong> Price:</strong>$propertyPrice</td>\r\n</tr>\r\n<tr >\r\n<td ><strong>Status :</strong>$propertyStatus</td>\r\n<td ><strong> Bedrooms:</strong>$propertyBedroom</td>\r\n</tr>\r\n<tr>\r\n<td ><strong> Bathrooms:</strong>$propertyBathroom</td>\r\n<td ><strong> Area:</strong>$propertyArea</td>\r\n</tr>\r\n<tr >\r\n<td colspan="2"><strong> Agent:</strong>$propertyAgent</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<strong>Features</strong>\r\n</td>\r\n<td >\r\n$feature \r\n</td>\r\n</tr>\r\n<tr>\r\n<td colspan="2"><strong>Description :</strong>$propertyDescription</td>\r\n</tr>\r\n\r\n</table>', 'EMA', 'Published', 'No');

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

--
-- Table structure for table `types`
--

DROP TABLE IF EXISTS `types`;
CREATE TABLE IF NOT EXISTS `types` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `dirt` varchar(255) DEFAULT NULL,
  `photo` varchar(100) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `types`
--

INSERT INTO `types` (`id`, `name`, `dirt`, `photo`) VALUES
(1, 'Lands', 'type', NULL),
(2, 'Plots', 'type', NULL),
(3, 'Commercial', 'type', NULL),
(5, 'House', 'type', '0a3b9e131c949a0e4286cf34c9edd63c.jpg'),
(6, 'Flat', 'type', 'b9687f6b9d0d00632e33bd743a9a6eb8.jpg'),
(7, 'Cottage', 'type', NULL),
(8, 'Apartment', 'type', NULL),
(9, 'Condominium', 'type', NULL);

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

--
-- Table structure for table `ugroups`
--

DROP TABLE IF EXISTS `ugroups`;
CREATE TABLE IF NOT EXISTS `ugroups` (
`id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `type` varchar(3) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `ugroups`
--

INSERT INTO `ugroups` (`id`, `name`, `type`, `created`, `modified`) VALUES
(1, 'Administrator', 'ADR', '2012-07-05 17:16:24', '2012-07-05 17:16:24'),
(2, 'Agent', 'AGT', '2016-05-14 16:54:58', '2016-05-14 16:54:58'),
(3, 'Manager', 'MAR', '2016-05-26 10:26:59', '2016-05-26 10:26:59'),
(4, 'Agency', 'AGY', '2016-07-02 11:45:05', '2016-07-02 11:45:05');

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

--
-- Table structure for table `units`
--

DROP TABLE IF EXISTS `units`;
CREATE TABLE IF NOT EXISTS `units` (
`id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `name`) VALUES
(1, 'Sq. Ft.'),
(2, 'Sq. mtr.');

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

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL,
  `ugroup_id` int(11) NOT NULL DEFAULT '2',
  `project_id` int(11) DEFAULT NULL,
  `location_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `skype` varchar(100) DEFAULT NULL,
  `facebook` varchar(100) DEFAULT NULL,
  `twitter` varchar(100) DEFAULT NULL,
  `linkedin` varchar(100) DEFAULT NULL,
  `description` text,
  `dir` varchar(255) DEFAULT NULL,
  `photo` varchar(250) DEFAULT NULL,
  `status` enum('Active','Suspend') DEFAULT 'Active',
  `presetcode` varchar(10) DEFAULT NULL,
  `deleted` char(1) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `ugroup_id`, `project_id`, `location_id`, `name`, `username`, `password`, `phone`, `mobile`, `address`, `email`, `skype`, `facebook`, `twitter`, `linkedin`, `description`, `dir`, `photo`, `status`, `presetcode`, `deleted`, `created`, `modified`) VALUES
(1, 1, NULL, NULL, 'Administrator', 'admin', 'dfb37faf99ffd691383e054541f1a3fd1966273d359d85aa419562fc26bf4427', '', '0000000000', 'Demo', 'root@localhost.com', '', '', '', '', '', NULL, NULL, 'Active', NULL, NULL, '2014-04-01 21:08:06', '2016-07-02 14:30:35'),
(2, 4, 7, 2, 'Elfemo', 'elfemo', 'e41f2b7320732d52cbc55c70a7e96844259d512d9087dde5ff830723b2aa82dc', '0000000000', '000000001', 'Demo', 'demoagent@gmail.com', 'elfemo011', 'elfemo0123', 'elfemo012', 'elfemo0124', 'Demo', '', 'a02c69de84e802e5db95c9a4fcc3c5a7.png', 'Active', NULL, NULL, '2016-06-15 17:26:47', '2016-11-18 16:34:46'),
(5, 4, 9, NULL, 'Agency A', 'agencya', 'e41f2b7320732d52cbc55c70a7e96844259d512d9087dde5ff830723b2aa82dc', '0000000000', '0000000000', 'Demo', 'agencya@gmail.com', 'SIAGENCYA', 'FIAGENCYA', 'TIAGENCYA', 'LIAGENCYA', 'Demo', NULL, '6f22fa8e33db03ef8bdfd5e4864bbb92.jpg', 'Active', NULL, NULL, '2016-07-02 14:04:20', '2016-11-18 15:38:42'),
(7, 2, 7, 3, 'Elfemo Agent', 'elfemoagent', 'e41f2b7320732d52cbc55c70a7e96844259d512d9087dde5ff830723b2aa82dc', '0123456789', '', 'Demo', 'elfemoagent@demo.com', '', '', '', '', '', NULL, NULL, 'Active', NULL, NULL, '2016-07-02 14:32:21', '2016-11-18 16:36:08'),
(11, 2, 9, 2, 'Agent A', 'agenta', 'e41f2b7320732d52cbc55c70a7e96844259d512d9087dde5ff830723b2aa82dc', '', '', 'Demo', 'agenta@demo.com', '', '', '', '', '', NULL, NULL, 'Active', NULL, NULL, '2016-08-05 13:38:49', '2016-11-18 13:39:11');

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

--
-- Table structure for table `vendors`
--

DROP TABLE IF EXISTS `vendors`;
CREATE TABLE IF NOT EXISTS `vendors` (
`id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `contact` varchar(25) DEFAULT NULL,
  `licence_no` varchar(25) DEFAULT NULL,
  `project_id` int(11) DEFAULT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `vendors`
--

INSERT INTO `vendors` (`id`, `name`, `address`, `contact`, `licence_no`, `project_id`) VALUES
(1, 'Demo Name', 'Demo Address', '0', '', 7),
(2, 'Vendor A', 'Demo', '0', '658', 7);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `awallets`
--
ALTER TABLE `awallets`
 ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `awallet_histories`
--
ALTER TABLE `awallet_histories`
 ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `calendars`
--
ALTER TABLE `calendars`
 ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
 ADD PRIMARY KEY (`id`), ADD KEY `category_id` (`category_id`), ADD KEY `user_id` (`user_id`), ADD KEY `project_id` (`project_id`);

--
-- Indexes for table `configurations`
--
ALTER TABLE `configurations`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `contents`
--
ALTER TABLE `contents`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `contracts`
--
ALTER TABLE `contracts`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `currencies`
--
ALTER TABLE `currencies`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deals`
--
ALTER TABLE `deals`
 ADD PRIMARY KEY (`id`), ADD KEY `client_id` (`client_id`), ADD KEY `property_id` (`property_id`), ADD KEY `properties_flat_id` (`properties_flat_id`), ADD KEY `plan_id` (`plan_id`);

--
-- Indexes for table `deals_payments`
--
ALTER TABLE `deals_payments`
 ADD PRIMARY KEY (`id`), ADD KEY `deal_id` (`deal_id`), ADD KEY `paymenttype_id` (`paymenttype_id`), ADD KEY `plans_payment_id` (`plans_payment_id`), ADD KEY `property_id` (`property_id`);

--
-- Indexes for table `emailsettings`
--
ALTER TABLE `emailsettings`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`);

--
-- Indexes for table `emailtemplates`
--
ALTER TABLE `emailtemplates`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
 ADD PRIMARY KEY (`id`), ADD KEY `expense_category_id` (`expense_category_id`), ADD KEY `vendor_id` (`vendor_id`), ADD KEY `project_id` (`project_id`);

--
-- Indexes for table `expenses_payments`
--
ALTER TABLE `expenses_payments`
 ADD PRIMARY KEY (`id`), ADD KEY `expense_id` (`expense_id`), ADD KEY `paymenttype_id` (`paymenttype_id`);

--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `favourites`
--
ALTER TABLE `favourites`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `features`
--
ALTER TABLE `features`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inventories`
--
ALTER TABLE `inventories`
 ADD PRIMARY KEY (`id`), ADD KEY `project_id` (`project_id`), ADD KEY `expense_category_id` (`expense_category_id`), ADD KEY `vendor_id` (`vendor_id`);

--
-- Indexes for table `inventories_balances`
--
ALTER TABLE `inventories_balances`
 ADD PRIMARY KEY (`id`), ADD KEY `inventory_id` (`inventory_id`);

--
-- Indexes for table `leads`
--
ALTER TABLE `leads`
 ADD PRIMARY KEY (`id`), ADD KEY `property_id` (`property_id`), ADD KEY `user_id` (`user_id`), ADD KEY `project_id` (`project_id`), ADD KEY `client_id` (`client_id`), ADD KEY `status_id` (`status_id`);

--
-- Indexes for table `locations`
--
ALTER TABLE `locations`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `page_rights`
--
ALTER TABLE `page_rights`
 ADD PRIMARY KEY (`id`), ADD KEY `page_id` (`page_id`), ADD KEY `ugroup_id` (`ugroup_id`);

--
-- Indexes for table `paymenttypes`
--
ALTER TABLE `paymenttypes`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `plans`
--
ALTER TABLE `plans`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `plans_payments`
--
ALTER TABLE `plans_payments`
 ADD PRIMARY KEY (`id`), ADD KEY `deal_id` (`deal_id`);

--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `properties`
--
ALTER TABLE `properties`
 ADD PRIMARY KEY (`id`), ADD KEY `project_id` (`project_id`), ADD KEY `location_id` (`location_id`), ADD KEY `status_id` (`contract_id`), ADD KEY `type_id` (`type_id`), ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `properties_documents`
--
ALTER TABLE `properties_documents`
 ADD PRIMARY KEY (`id`), ADD KEY `property_id` (`property_id`);

--
-- Indexes for table `properties_features`
--
ALTER TABLE `properties_features`
 ADD PRIMARY KEY (`id`), ADD KEY `property_id` (`property_id`,`feature_id`), ADD KEY `feature_id` (`feature_id`), ADD KEY `property_id_2` (`property_id`), ADD KEY `feature_id_2` (`feature_id`);

--
-- Indexes for table `properties_floorplans`
--
ALTER TABLE `properties_floorplans`
 ADD PRIMARY KEY (`id`), ADD KEY `property_id` (`property_id`), ADD KEY `property_id_2` (`property_id`);

--
-- Indexes for table `properties_photos`
--
ALTER TABLE `properties_photos`
 ADD PRIMARY KEY (`id`), ADD KEY `property_id` (`property_id`), ADD KEY `property_id_2` (`property_id`);

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
 ADD PRIMARY KEY (`id`), ADD KEY `project_id` (`project_id`), ADD KEY `unit_id` (`unit_id`);

--
-- Indexes for table `purchases_payments`
--
ALTER TABLE `purchases_payments`
 ADD PRIMARY KEY (`id`), ADD KEY `purchase_id` (`purchase_id`), ADD KEY `paymenttype_id` (`paymenttype_id`);

--
-- Indexes for table `search_histories`
--
ALTER TABLE `search_histories`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `slides`
--
ALTER TABLE `slides`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smssettings`
--
ALTER TABLE `smssettings`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smstemplates`
--
ALTER TABLE `smstemplates`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `statuses`
--
ALTER TABLE `statuses`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`);

--
-- Indexes for table `taxes`
--
ALTER TABLE `taxes`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `templates`
--
ALTER TABLE `templates`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `types`
--
ALTER TABLE `types`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ugroups`
--
ALTER TABLE `ugroups`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`), ADD KEY `ugroup_id` (`ugroup_id`), ADD KEY `project_id` (`project_id`), ADD KEY `location_id` (`location_id`);

--
-- Indexes for table `vendors`
--
ALTER TABLE `vendors`
 ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `awallets`
--
ALTER TABLE `awallets`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `awallet_histories`
--
ALTER TABLE `awallet_histories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `calendars`
--
ALTER TABLE `calendars`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=26;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=65;
--
-- AUTO_INCREMENT for table `configurations`
--
ALTER TABLE `configurations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `contents`
--
ALTER TABLE `contents`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `contracts`
--
ALTER TABLE `contracts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=23;
--
-- AUTO_INCREMENT for table `deals`
--
ALTER TABLE `deals`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `deals_payments`
--
ALTER TABLE `deals_payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `emailtemplates`
--
ALTER TABLE `emailtemplates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `expenses_payments`
--
ALTER TABLE `expenses_payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `expense_categories`
--
ALTER TABLE `expense_categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `favourites`
--
ALTER TABLE `favourites`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `features`
--
ALTER TABLE `features`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `inventories`
--
ALTER TABLE `inventories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `inventories_balances`
--
ALTER TABLE `inventories_balances`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `leads`
--
ALTER TABLE `leads`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `locations`
--
ALTER TABLE `locations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=80;
--
-- AUTO_INCREMENT for table `page_rights`
--
ALTER TABLE `page_rights`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=394;
--
-- AUTO_INCREMENT for table `paymenttypes`
--
ALTER TABLE `paymenttypes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `plans`
--
ALTER TABLE `plans`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=42;
--
-- AUTO_INCREMENT for table `plans_payments`
--
ALTER TABLE `plans_payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `projects`
--
ALTER TABLE `projects`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `properties`
--
ALTER TABLE `properties`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=90;
--
-- AUTO_INCREMENT for table `properties_documents`
--
ALTER TABLE `properties_documents`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `properties_features`
--
ALTER TABLE `properties_features`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1081;
--
-- AUTO_INCREMENT for table `properties_floorplans`
--
ALTER TABLE `properties_floorplans`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `properties_photos`
--
ALTER TABLE `properties_photos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=127;
--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `purchases_payments`
--
ALTER TABLE `purchases_payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `search_histories`
--
ALTER TABLE `search_histories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `slides`
--
ALTER TABLE `slides`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `smssettings`
--
ALTER TABLE `smssettings`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `smstemplates`
--
ALTER TABLE `smstemplates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `statuses`
--
ALTER TABLE `statuses`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `taxes`
--
ALTER TABLE `taxes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `templates`
--
ALTER TABLE `templates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `types`
--
ALTER TABLE `types`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `ugroups`
--
ALTER TABLE `ugroups`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `vendors`
--
ALTER TABLE `vendors`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `awallets`
--
ALTER TABLE `awallets`
ADD CONSTRAINT `awallets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `awallet_histories`
--
ALTER TABLE `awallet_histories`
ADD CONSTRAINT `awallet_histories_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `calendars`
--
ALTER TABLE `calendars`
ADD CONSTRAINT `calendars_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `clients`
--
ALTER TABLE `clients`
ADD CONSTRAINT `clients_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `clients_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `clients_ibfk_3` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `deals`
--
ALTER TABLE `deals`
ADD CONSTRAINT `deals_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`),
ADD CONSTRAINT `deals_ibfk_2` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`),
ADD CONSTRAINT `deals_ibfk_4` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`);

--
-- Constraints for table `deals_payments`
--
ALTER TABLE `deals_payments`
ADD CONSTRAINT `deals_payments_ibfk_1` FOREIGN KEY (`deal_id`) REFERENCES `deals` (`id`),
ADD CONSTRAINT `deals_payments_ibfk_4` FOREIGN KEY (`paymenttype_id`) REFERENCES `paymenttypes` (`id`),
ADD CONSTRAINT `deals_payments_ibfk_5` FOREIGN KEY (`plans_payment_id`) REFERENCES `plans_payments` (`id`),
ADD CONSTRAINT `deals_payments_ibfk_6` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`);

--
-- Constraints for table `expenses`
--
ALTER TABLE `expenses`
ADD CONSTRAINT `expenses_ibfk_1` FOREIGN KEY (`expense_category_id`) REFERENCES `expense_categories` (`id`),
ADD CONSTRAINT `expenses_ibfk_2` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `expenses_ibfk_3` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`);

--
-- Constraints for table `expenses_payments`
--
ALTER TABLE `expenses_payments`
ADD CONSTRAINT `expenses_payments_ibfk_1` FOREIGN KEY (`expense_id`) REFERENCES `expenses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `expenses_payments_ibfk_2` FOREIGN KEY (`paymenttype_id`) REFERENCES `paymenttypes` (`id`);

--
-- Constraints for table `inventories`
--
ALTER TABLE `inventories`
ADD CONSTRAINT `inventories_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
ADD CONSTRAINT `inventories_ibfk_2` FOREIGN KEY (`expense_category_id`) REFERENCES `expense_categories` (`id`),
ADD CONSTRAINT `inventories_ibfk_3` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`);

--
-- Constraints for table `inventories_balances`
--
ALTER TABLE `inventories_balances`
ADD CONSTRAINT `inventories_balances_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `inventories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `leads`
--
ALTER TABLE `leads`
ADD CONSTRAINT `leads_ibfk_2` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `leads_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `leads_ibfk_4` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `leads_ibfk_5` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `leads_ibfk_6` FOREIGN KEY (`status_id`) REFERENCES `statuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `page_rights`
--
ALTER TABLE `page_rights`
ADD CONSTRAINT `page_rights_ibfk_1` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `page_rights_ibfk_2` FOREIGN KEY (`ugroup_id`) REFERENCES `ugroups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `plans_payments`
--
ALTER TABLE `plans_payments`
ADD CONSTRAINT `plans_payments_ibfk_1` FOREIGN KEY (`deal_id`) REFERENCES `deals` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `properties`
--
ALTER TABLE `properties`
ADD CONSTRAINT `properties_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
ADD CONSTRAINT `properties_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`),
ADD CONSTRAINT `properties_ibfk_3` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`id`),
ADD CONSTRAINT `properties_ibfk_4` FOREIGN KEY (`type_id`) REFERENCES `types` (`id`),
ADD CONSTRAINT `properties_ibfk_5` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `properties_documents`
--
ALTER TABLE `properties_documents`
ADD CONSTRAINT `properties_documents_ibfk_1` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `properties_features`
--
ALTER TABLE `properties_features`
ADD CONSTRAINT `properties_features_ibfk_1` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `properties_features_ibfk_2` FOREIGN KEY (`feature_id`) REFERENCES `features` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `properties_floorplans`
--
ALTER TABLE `properties_floorplans`
ADD CONSTRAINT `properties_floorplans_ibfk_1` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `properties_photos`
--
ALTER TABLE `properties_photos`
ADD CONSTRAINT `properties_photos_ibfk_1` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `purchases`
--
ALTER TABLE `purchases`
ADD CONSTRAINT `purchases_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
ADD CONSTRAINT `purchases_ibfk_2` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`);

--
-- Constraints for table `purchases_payments`
--
ALTER TABLE `purchases_payments`
ADD CONSTRAINT `purchases_payments_ibfk_1` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `purchases_payments_ibfk_2` FOREIGN KEY (`paymenttype_id`) REFERENCES `paymenttypes` (`id`);

--
-- Constraints for table `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`ugroup_id`) REFERENCES `ugroups` (`id`),
ADD CONSTRAINT `users_ibfk_2` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `users_ibfk_3` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`);

/*!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 */;
