-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `jobcard`
--

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

--
-- Table structure for table `employeemaster`
--

CREATE TABLE `employeemaster` (
  `employeeId` int(11) NOT NULL,
  `employeeType` varchar(20) DEFAULT NULL,
  `employeeName` varchar(30) DEFAULT NULL,
  `employeeAddress` varchar(50) DEFAULT NULL,
  `employeePhone` varchar(30) DEFAULT NULL,
  `employeeEmail` varchar(30) DEFAULT NULL,
  `employeeWhatsNo` varchar(30) DEFAULT NULL,
  `employeeDrivingLic` varchar(30) DEFAULT NULL,
  `employeePayment` decimal(8,2) DEFAULT NULL,
  `employeeJoiningDate` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employeemaster`
--

INSERT INTO `employeemaster` (`employeeId`, `employeeType`, `employeeName`, `employeeAddress`, `employeePhone`, `employeeEmail`, `employeeWhatsNo`, `employeeDrivingLic`, `employeePayment`, `employeeJoiningDate`) VALUES
(1, 'parmanent', 'umesh', 'Nashik', '7066669650', 'umesh@gmail.com', '7066669650', 'Sno23', '15000.00', '02-01-2019'),
(2, 'parmanent', 'umesh', 'Nashik', '7066669650', 'umesh@gmail.com', '7066669650', 'Sno23', '15000.00', '02-01-2019'),
(3, 'parmanent', 'umesh', 'Nashik', '7066669650', 'umesh@gmail.com', '7066669650', 'Sno23', '15000.00', '02-01-2019'),
(11, 'abc', 'umesh', 'nashik', '7066669650', 'umu@gmail.com', '7066669650', 'no', '1200.00', '12-2-2018'),
(12, 'abc', 'umesh', 'nashik', '7066669650', 'umu@gmail.com', '7066669650', 'no', '1200.00', '12-2-2018'),
(13, 'abc', 'manikant', 'nashik', '9876543210', 'mani@gmail.com', '9876543210', 'no', '1200.00', '12-2-2018');

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

--
-- Table structure for table `employeetype`
--

CREATE TABLE `employeetype` (
  `employeeTypeId` int(11) NOT NULL,
  `employeeTypeName` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employeetype`
--

INSERT INTO `employeetype` (`employeeTypeId`, `employeeTypeName`) VALUES
(1, 'permanent'),
(2, 'permanent'),
(3, 'Existing'),
(4, ''),
(12, 'demo'),
(13, 'demo'),
(14, 'demo'),
(15, 'demo'),
(16, '');

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

--
-- Table structure for table `manufacture`
--

CREATE TABLE `manufacture` (
  `manufacturing_Id` int(11) NOT NULL,
  `manufacturing_Name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `manufacture`
--

INSERT INTO `manufacture` (`manufacturing_Id`, `manufacturing_Name`) VALUES
(1, 'bajaj');

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

--
-- Table structure for table `masterdetail`
--

CREATE TABLE `masterdetail` (
  `jobDetailsId` int(11) NOT NULL,
  `partId` int(11) NOT NULL,
  `serviceId` int(11) NOT NULL,
  `jobCardId` int(11) NOT NULL,
  `jobDetailsPrice` varchar(250) DEFAULT NULL,
  `jobDetailsDiscount` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `masterdetail`
--

INSERT INTO `masterdetail` (`jobDetailsId`, `partId`, `serviceId`, `jobCardId`, `jobDetailsPrice`, `jobDetailsDiscount`) VALUES
(1, 1, 1, 1, '1300', 'demo'),
(2, 1, 1, 1, '1300', 'demo'),
(3, 1, 1, 1, '1300', 'demo');

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

--
-- Table structure for table `masterheader`
--

CREATE TABLE `masterheader` (
  `jobCardId` int(11) NOT NULL,
  `jobCardFKVehicleId` varchar(250) DEFAULT NULL,
  `jobCardVehicleKM` varchar(250) DEFAULT NULL,
  `jobCardDateIN` varchar(250) DEFAULT NULL,
  `jobCardFuel` varchar(250) DEFAULT NULL,
  `jobCardServiceType` varchar(250) DEFAULT NULL,
  `jobCardFKEmployeeId` varchar(250) DEFAULT NULL,
  `jobCardOtherRemark` varchar(250) DEFAULT NULL,
  `jobCardStatus` varchar(250) DEFAULT NULL,
  `jobCardServiceTotal` varchar(250) DEFAULT NULL,
  `jobCardServiceDis` varchar(250) DEFAULT NULL,
  `jobCardPartTotal` varchar(250) DEFAULT NULL,
  `jobCardPartDis` varchar(250) DEFAULT NULL,
  `jobCardFrontImage` varchar(250) DEFAULT NULL,
  `jobCardBackImage` varchar(250) DEFAULT NULL,
  `jobCardLeftImage` varchar(250) DEFAULT NULL,
  `jobCardRightImage` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `masterheader`
--

INSERT INTO `masterheader` (`jobCardId`, `jobCardFKVehicleId`, `jobCardVehicleKM`, `jobCardDateIN`, `jobCardFuel`, `jobCardServiceType`, `jobCardFKEmployeeId`, `jobCardOtherRemark`, `jobCardStatus`, `jobCardServiceTotal`, `jobCardServiceDis`, `jobCardPartTotal`, `jobCardPartDis`, `jobCardFrontImage`, `jobCardBackImage`, `jobCardLeftImage`, `jobCardRightImage`) VALUES
(0, '', '', '', '', '', ' ', '', '', '', '', '', '', '', '', '', ''),
(1, '1', '50', '06-09-2018', '40LTR', 'Permenent', '1', 'Good services', 'done', '23', 'demo', '330', 'servicing good', 'abc.jpg', 'demo.png', 'pqr.jpg', 'demo.jpg'),
(2, '1', '50', '06-09-2018', '40LTR', 'Permenent', '1', 'Good services', 'done', '23', 'demo', '330', 'servicing good', 'abc.jpg', 'demo.png', 'pqr.jpg', 'demo.jpg'),
(3, '1', '50', '06-09-2018', '40LTR', 'Permenent', '1', 'Good services', 'done', '23', 'demo', '330', 'servicing good', 'abc.jpg', 'demo.png', 'pqr.jpg', 'demo.jpg'),
(12, '12', '2174', '06-2-2018', '65', 'demo', '3 ', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo'),
(15, '12', '2174', '06-2-2018', '65', 'demo', '3 ', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo');

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

--
-- Table structure for table `model`
--

CREATE TABLE `model` (
  `model_Id` int(11) NOT NULL,
  `model_Name` varchar(355) NOT NULL,
  `manufacturing_Id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `model`
--

INSERT INTO `model` (`model_Id`, `model_Name`, `manufacturing_Id`) VALUES
(1, 'Pulsar', 1),
(7, 'tata', 1),
(8, 'honda', 1);

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

--
-- Table structure for table `part`
--

CREATE TABLE `part` (
  `partId` int(11) NOT NULL,
  `model_Id` int(11) NOT NULL,
  `manufacturing_Id` int(11) NOT NULL,
  `partName` varchar(255) DEFAULT NULL,
  `partPurchaseRate` varchar(255) DEFAULT NULL,
  `partNetRate` decimal(8,2) DEFAULT NULL,
  `partMRP` decimal(8,2) DEFAULT NULL,
  `partCurrentStock` varchar(255) DEFAULT NULL,
  `part_maxStock` varchar(255) DEFAULT NULL,
  `part_minStock` varchar(255) DEFAULT NULL,
  `part_binLocation` varchar(255) DEFAULT NULL,
  `part_hsnCode` varchar(255) DEFAULT NULL,
  `part_gstRate` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `part`
--

INSERT INTO `part` (`partId`, `model_Id`, `manufacturing_Id`, `partName`, `partPurchaseRate`, `partNetRate`, `partMRP`, `partCurrentStock`, `part_maxStock`, `part_minStock`, `part_binLocation`, `part_hsnCode`, `part_gstRate`) VALUES
(1, 1, 1, 'mirror', '1200', '1200.00', '1100.00', '1150', '500', '2000', '50', 'Store', '#234'),
(2, 1, 1, 'head light', '1350', '1200.00', '1100.00', '1150', '500', '2000', '50', 'Store', '#234'),
(3, 1, 1, 'mirror', '1200', '1200.00', '1100.00', '1150', '500', '2000', '50', 'Store', '#234'),
(5, 1, 1, 'indicator', '1500', '1520.00', '1200.00', '200', '300', '20', 'Mumbai', '234', '');

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

--
-- Table structure for table `servicemaster`
--

CREATE TABLE `servicemaster` (
  `serviceId` int(11) NOT NULL,
  `serviceName` varchar(250) DEFAULT NULL,
  `servicePrice` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `servicemaster`
--

INSERT INTO `servicemaster` (`serviceId`, `serviceName`, `servicePrice`) VALUES
(0, '', ''),
(1, 'Tata', '1000'),
(2, 'Tata', '1000'),
(3, 'Tata', '1000'),
(4, 'bajaj finance', '1200'),
(5, 'bajaj finance', '1200'),
(6, 'bajaj finance', '1200'),
(7, 'tata', '150');

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

--
-- Table structure for table `vehiclemaster`
--

CREATE TABLE `vehiclemaster` (
  `vehicleUserName` varchar(250) DEFAULT NULL,
  `vehicleUserAddress` varchar(250) DEFAULT NULL,
  `vehicleUserMobile` varchar(250) DEFAULT NULL,
  `vehicleUserEmail` varchar(250) DEFAULT NULL,
  `vehicleUserWhatsApp` varchar(250) DEFAULT NULL,
  `vehicleNumber` varchar(250) DEFAULT NULL,
  `vehicleVINNo` varchar(250) DEFAULT NULL,
  `vehicleEANo` varchar(250) DEFAULT NULL,
  `vehicleGSTNNo` varchar(250) DEFAULT NULL,
  `vehicleInsuranceCompany` varchar(250) DEFAULT NULL,
  `vehicleInsuranceDuaDate` varchar(250) DEFAULT NULL,
  `insuranceImage` varchar(250) DEFAULT NULL,
  `RCBookImage` varchar(250) DEFAULT NULL,
  `drivingLicenceImage` varchar(250) DEFAULT NULL,
  `chequeImage` varchar(250) DEFAULT NULL,
  `panCardImage` varchar(250) DEFAULT NULL,
  `adharCardImage` varchar(250) DEFAULT NULL,
  `extraRemark` varchar(250) DEFAULT NULL,
  `manufacturing_Id` int(11) NOT NULL,
  `model_Id` int(11) NOT NULL,
  `vehicleid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vehiclemaster`
--

INSERT INTO `vehiclemaster` (`vehicleUserName`, `vehicleUserAddress`, `vehicleUserMobile`, `vehicleUserEmail`, `vehicleUserWhatsApp`, `vehicleNumber`, `vehicleVINNo`, `vehicleEANo`, `vehicleGSTNNo`, `vehicleInsuranceCompany`, `vehicleInsuranceDuaDate`, `insuranceImage`, `RCBookImage`, `drivingLicenceImage`, `chequeImage`, `panCardImage`, `adharCardImage`, `extraRemark`, `manufacturing_Id`, `model_Id`, `vehicleid`) VALUES
('umesh', 'Nashik', '7066669650', 'umu@gmail.com', '7066669650', 'MH17 AB 2018', 'IP3865', 'EA385', 'GST3748', 'Bajaj', '25-12-2018', 'abc.jpg', 'pqr.jpg', 'xyz.com', 'abc.jpg', 'delete.jpg', 'demo.jpg', 'Good', 1, 1, 2),
('umesh', 'Nashik', '7066669650', 'umu@gmail.com', '7066669650', 'MH17 AB 2018', 'IP3865', 'EA385', 'GST3748', 'Bajaj', '25-12-2018', 'abc.jpg', 'pqr.jpg', 'xyz.com', 'abc.jpg', 'delete.jpg', 'demo.jpg', 'Good', 1, 1, 3),
('$vehicleUserName', '$vehicleUserAddress', '$vehicleUserMobile', '$vehicleUserEmail', '$vehicleUserWhatsApp', '$vehicleNumber', '$vehicleVINNo', '$vehicleEANo', '$vehicleGSTNNo', '$vehicleInsuranceCompany', '$vehicleInsuranceDuaDate', '$insuranceImage', '$RCBookImage', '$drivingLicenceImage', '$chequeImage', '$panCardImage', '$adharCardImage', '$extraRemark', 1, 1, 6),
('umesh', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 1, 1, 9),
('umesh', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 1, 1, 10),
('umesh', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 'demo', 1, 1, 11);

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

--
-- Table structure for table `vendormaster`
--

CREATE TABLE `vendormaster` (
  `vendorName` varchar(250) DEFAULT NULL,
  `vendorAddress` varchar(250) DEFAULT NULL,
  `vendorPhone` varchar(250) NOT NULL,
  `vendorEmail` varchar(250) NOT NULL,
  `vendorWhatsApp` varchar(250) NOT NULL,
  `vendorGSTNo` varchar(250) NOT NULL,
  `vendorPanCard` varchar(250) NOT NULL,
  `vendorBankName` varchar(250) NOT NULL,
  `vendorBankHolder` varchar(250) NOT NULL,
  `vendorAccountNo` varchar(250) NOT NULL,
  `vendorIFSCCode` varchar(250) NOT NULL,
  `vendorRemark` varchar(250) NOT NULL,
  `vendorId` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vendormaster`
--

INSERT INTO `vendormaster` (`vendorName`, `vendorAddress`, `vendorPhone`, `vendorEmail`, `vendorWhatsApp`, `vendorGSTNo`, `vendorPanCard`, `vendorBankName`, `vendorBankHolder`, `vendorAccountNo`, `vendorIFSCCode`, `vendorRemark`, `vendorId`) VALUES
('demo', 'demo', '7066669650', 'demo@gmail.com', '9876543210', 'GST2347', 'PAN34960', 'PAN34960', 'Umesh Bhalerao', '074635783', 'SBI384570005', 'done', 1),
('demo', 'demo', '7066669650', 'demo@gmail.com', '9876543210', 'GST2347', 'PAN34960 ', 'State Bank Of india', 'Umesh Bhalerao', '074635783', 'SBI384570005', 'done', 2),
('', '', '', '', '', '', ' ', '', '', '', '', '', 3),
('', '', '', '', '', '', ' ', '', '', '', '', '', 4),
('', '', '', '', '', '', ' ', '', '', '', '', '', 5),
('', '', '', '', '', '', ' ', '', '', '', '', '', 6),
('', '', '', '', '', '', ' ', '', '', '', '', '', 7),
('$vendorname', '$vendoraddress', '$vendorphone', '$vendoremail', '$vendorwhatsapp', '$vendorgstno', '$vendorpancard ', '$vendorbank', '$vendorbankholder', '$vendoraccno', '$vendorifsc', '$vendorremark', 8),
('', '', '', '', '', '', ' ', '', '', '', '', '', 9);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `employeemaster`
--
ALTER TABLE `employeemaster`
  ADD PRIMARY KEY (`employeeId`);

--
-- Indexes for table `employeetype`
--
ALTER TABLE `employeetype`
  ADD PRIMARY KEY (`employeeTypeId`);

--
-- Indexes for table `manufacture`
--
ALTER TABLE `manufacture`
  ADD PRIMARY KEY (`manufacturing_Id`);

--
-- Indexes for table `masterdetail`
--
ALTER TABLE `masterdetail`
  ADD PRIMARY KEY (`jobDetailsId`),
  ADD KEY `fk_partId` (`partId`),
  ADD KEY `fk_serviceId` (`serviceId`),
  ADD KEY `fk_jobId` (`jobCardId`);

--
-- Indexes for table `masterheader`
--
ALTER TABLE `masterheader`
  ADD PRIMARY KEY (`jobCardId`);

--
-- Indexes for table `model`
--
ALTER TABLE `model`
  ADD PRIMARY KEY (`model_Id`),
  ADD KEY `fk_manufacturing_Id` (`manufacturing_Id`);

--
-- Indexes for table `part`
--
ALTER TABLE `part`
  ADD PRIMARY KEY (`partId`),
  ADD KEY `fk_modId` (`model_Id`),
  ADD KEY `fk_manuId` (`manufacturing_Id`);

--
-- Indexes for table `servicemaster`
--
ALTER TABLE `servicemaster`
  ADD PRIMARY KEY (`serviceId`);

--
-- Indexes for table `vehiclemaster`
--
ALTER TABLE `vehiclemaster`
  ADD PRIMARY KEY (`vehicleid`),
  ADD KEY `fk_manufacId` (`manufacturing_Id`),
  ADD KEY `fk_modelId` (`model_Id`);

--
-- Indexes for table `vendormaster`
--
ALTER TABLE `vendormaster`
  ADD PRIMARY KEY (`vendorId`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `employeemaster`
--
ALTER TABLE `employeemaster`
  MODIFY `employeeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `employeetype`
--
ALTER TABLE `employeetype`
  MODIFY `employeeTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `manufacture`
--
ALTER TABLE `manufacture`
  MODIFY `manufacturing_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT for table `model`
--
ALTER TABLE `model`
  MODIFY `model_Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `part`
--
ALTER TABLE `part`
  MODIFY `partId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `vehiclemaster`
--
ALTER TABLE `vehiclemaster`
  MODIFY `vehicleid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `vendormaster`
--
ALTER TABLE `vendormaster`
  MODIFY `vendorId` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `masterdetail`
--
ALTER TABLE `masterdetail`
  ADD CONSTRAINT `fk_jobId` FOREIGN KEY (`jobCardId`) REFERENCES `masterheader` (`jobCardId`),
  ADD CONSTRAINT `fk_partId` FOREIGN KEY (`partId`) REFERENCES `part` (`partId`),
  ADD CONSTRAINT `fk_serviceId` FOREIGN KEY (`serviceId`) REFERENCES `servicemaster` (`serviceId`);

--
-- Constraints for table `model`
--
ALTER TABLE `model`
  ADD CONSTRAINT `fk_manufacturing_Id` FOREIGN KEY (`manufacturing_Id`) REFERENCES `manufacture` (`manufacturing_Id`);

--
-- Constraints for table `part`
--
ALTER TABLE `part`
  ADD CONSTRAINT `fk_manuId` FOREIGN KEY (`manufacturing_Id`) REFERENCES `manufacture` (`manufacturing_Id`),
  ADD CONSTRAINT `fk_modId` FOREIGN KEY (`model_Id`) REFERENCES `model` (`model_Id`);

--
-- Constraints for table `vehiclemaster`
--
ALTER TABLE `vehiclemaster`
  ADD CONSTRAINT `fk_manufacId` FOREIGN KEY (`manufacturing_Id`) REFERENCES `manufacture` (`manufacturing_Id`),
  ADD CONSTRAINT `fk_modelId` FOREIGN KEY (`model_Id`) REFERENCES `model` (`model_Id`);
COMMIT;

