-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2017 at 06:41 AM
-- Server version: 5.5.36
-- PHP Version: 5.4.25

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: `azeemct`
--

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

--
-- Table structure for table `contractor`
--

CREATE TABLE IF NOT EXISTS `contractor` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL,
  `phone` bigint(12) NOT NULL,
  `address` varchar(45) NOT NULL,
  `bank_details` varchar(45) NOT NULL,
  `other_details` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `estimates`
--

CREATE TABLE IF NOT EXISTS `estimates` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `project_id` int(3) NOT NULL,
  `project_name` varchar(40) NOT NULL,
  `work_type_id` int(3) NOT NULL,
  `work_type_name` varchar(40) NOT NULL,
  `estimate` float NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `estimates`
--

INSERT INTO `estimates` (`id`, `project_id`, `project_name`, `work_type_id`, `work_type_name`, `estimate`) VALUES
(2, 1, 'XYZ Project', 1, 'SAND', 37500),
(3, 1, 'XYZ Project', 2, 'CEMENT', 86000);

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

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

CREATE TABLE IF NOT EXISTS `expenses` (
  `id` int(7) NOT NULL AUTO_INCREMENT,
  `project` int(3) NOT NULL,
  `floor_no` varchar(15) NOT NULL,
  `flat_no` varchar(10) NOT NULL,
  `date` date NOT NULL,
  `work_type` varchar(50) NOT NULL,
  `amount` float NOT NULL,
  `particulars` varchar(100) NOT NULL,
  `reference` varchar(50) NOT NULL,
  `comments` varchar(100) NOT NULL,
  `rcptphoto` varchar(60) NOT NULL,
  `payment_method` enum('cash','cheque','bank transfer') NOT NULL,
  `payment_details` varchar(50) NOT NULL,
  `name` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8809 ;

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

INSERT INTO `expenses` (`id`, `project`, `floor_no`, `flat_no`, `date`, `work_type`, `amount`, `particulars`, `reference`, `comments`, `rcptphoto`, `payment_method`, `payment_details`, `name`) VALUES
(8802, 1, '', '', '2017-04-07', '10', 10000, 'Paid labor Payment.', 'Azeem Heights07042017Yousuf Electrician', '', '', 'cash', '', ''),
(8803, 1, '', '', '2017-04-07', '3', 6000, 'paid to javed bhai and asghar', 'Azeem Heights07042017KANKAR 20MM', '', '', 'cheque', 'Ch85745200', ''),
(8805, 1, '', '', '2017-04-07', '29', 5000, 'paid to javed bhai', 'Azeem Heights07042017KANKAR 20MM', '', '', 'cheque', 'Ch857452', ''),
(8806, 1, '', '', '2017-04-05', '89', 300, 'nawerwer', '', '', '', 'cheque', 'c14545', 'Mubasshir'),
(8807, 1, '', '', '2017-04-05', '89', 300, 'nawerwer', '', '', '', 'cheque', 'c14545', ''),
(8808, 1, '', '', '2017-04-21', '92', 6000, 'abcd', '', '', '', 'cash', '', '');

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

--
-- Table structure for table `investments`
--

CREATE TABLE IF NOT EXISTS `investments` (
  `id` int(7) NOT NULL AUTO_INCREMENT,
  `investor` int(3) NOT NULL,
  `date` date NOT NULL,
  `amount` float NOT NULL,
  `particulars` varchar(100) NOT NULL,
  `payment_method` enum('cash','cheque','bank transfer') NOT NULL,
  `payment_details` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `investments`
--

INSERT INTO `investments` (`id`, `investor`, `date`, `amount`, `particulars`, `payment_method`, `payment_details`) VALUES
(1, 5, '2017-04-07', 35000, 'abcd', 'cash', '');

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

--
-- Table structure for table `investor`
--

CREATE TABLE IF NOT EXISTS `investor` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL,
  `phone` bigint(12) NOT NULL,
  `address` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `investor`
--

INSERT INTO `investor` (`id`, `name`, `phone`, `address`) VALUES
(4, 'Mohammed Javed', 5885585, 'Hyderabad'),
(5, 'Khurram', 987987, 'Toli chowki');

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

--
-- Table structure for table `project`
--

CREATE TABLE IF NOT EXISTS `project` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `project_name` varchar(40) NOT NULL,
  `no_floors` int(2) NOT NULL,
  `start_date` date NOT NULL,
  `project_address` varchar(40) NOT NULL,
  `project_details` varchar(120) NOT NULL,
  `photo` varchar(30) NOT NULL,
  `no_flats` int(3) NOT NULL,
  `flats` varchar(200) NOT NULL,
  `type` enum('mt','ct') NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `project`
--

INSERT INTO `project` (`id`, `project_name`, `no_floors`, `start_date`, `project_address`, `project_details`, `photo`, `no_flats`, `flats`, `type`) VALUES
(9, 'Azeem Heights', 5, '2017-01-30', 'Mehdipatnam', '370 Sq Yds', '', 15, '101 - 503', 'ct');

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

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(1) NOT NULL AUTO_INCREMENT,
  `username` varchar(15) NOT NULL,
  `password` varchar(10) NOT NULL,
  `email` varchar(25) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`id`, `username`, `password`, `email`) VALUES
(1, 'admin', 'admin123', '');

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

--
-- Table structure for table `work_type`
--

CREATE TABLE IF NOT EXISTS `work_type` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `work_type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=93 ;

--
-- Dumping data for table `work_type`
--

INSERT INTO `work_type` (`id`, `work_type`) VALUES
(1, 'SAND'),
(2, 'CEMENT'),
(4, 'ELECTRICITY BILL'),
(5, 'SANITARY'),
(6, 'WATCHMAN '),
(7, 'SUPERVISOR'),
(8, 'DOOR FRAMES'),
(9, 'SENU (Labour payment)'),
(10, 'TRUPATTY (Labour payment)'),
(11, 'REDDY MIX'),
(12, 'PIN AND VIBRATOR'),
(13, 'DEPARTMENT LABOUR'),
(14, 'BRICKS'),
(18, 'CHIPPING LABOUR'),
(29, 'KANKAR 20MM'),
(30, 'KANKAR 60MM'),
(77, 'ELECTRICAL MATERIAL'),
(89, 'IBRAHIM (Water Proofing)'),
(92, 'Miscellaneous');

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