-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 14, 2017 at 09:36 AM
-- Server version: 5.5.55-cll
-- PHP Version: 5.6.30

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

--
-- Database: `mydev_gap`
--

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

--
-- Table structure for table `late_coming_daily_summary`
--

CREATE TABLE `late_coming_daily_summary` (
  `LCDS_ID` int(11) NOT NULL,
  `ATTEND_CALENDAR_ID` int(11) NOT NULL,
  `PUNCH_IN_UTC_TIME` datetime NOT NULL,
  `DAY_NM` varchar(250) NOT NULL,
  `ATTND_EMP_ID` int(11) NOT NULL,
  `ATTND_EMP_NAME` varchar(250) NOT NULL,
  `SHIFT_TIME` time NOT NULL,
  `LATE_BY` time NOT NULL,
  `OA_ID` int(11) NOT NULL,
  `OA_BRAND_ID` int(11) NOT NULL,
  `USER_ID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `late_coming_daily_summary`
--

INSERT INTO `late_coming_daily_summary` (`LCDS_ID`, `ATTEND_CALENDAR_ID`, `PUNCH_IN_UTC_TIME`, `DAY_NM`, `ATTND_EMP_ID`, `ATTND_EMP_NAME`, `SHIFT_TIME`, `LATE_BY`, `OA_ID`, `OA_BRAND_ID`, `USER_ID`) VALUES
(143, 564, '0000-00-00 00:00:00', 'Monday', 179, 'Oscar', '00:00:00', '00:00:00', 310, 333, 596),
(144, 564, '0000-00-00 00:00:00', 'Monday', 185, 'Izzat', '00:00:00', '00:00:00', 310, 333, 613),
(145, 564, '0000-00-00 00:00:00', 'Monday', 186, 'sparrow', '00:00:00', '00:00:00', 310, 333, 614),
(146, 564, '0000-00-00 00:00:00', 'Monday', 188, 'Starboy', '00:00:00', '00:00:00', 310, 333, 618),
(147, 564, '0000-00-00 00:00:00', 'Monday', 189, 'Schindler', '00:00:00', '00:00:00', 310, 333, 619),
(148, 564, '0000-00-00 00:00:00', 'Monday', 190, 'Pushpa', '00:00:00', '00:00:00', 310, 333, 620),
(149, 564, '0000-00-00 00:00:00', 'Monday', 191, 'Roger', '00:00:00', '00:00:00', 310, 333, 621),
(150, 564, '0000-00-00 00:00:00', 'Monday', 192, 'Stuart', '00:00:00', '00:00:00', 310, 333, 622),
(151, 564, '0000-00-00 00:00:00', 'Monday', 193, 'rahul', '00:00:00', '00:00:00', 310, 333, 623),
(152, 564, '0000-00-00 00:00:00', 'Monday', 195, 'Yuvraj', '00:00:00', '00:00:00', 310, 333, 625),
(153, 564, '0000-00-00 00:00:00', 'Monday', 196, 'Franklin', '00:00:00', '00:00:00', 310, 333, 626),
(154, 564, '0000-00-00 00:00:00', 'Monday', 199, 'Litleboy', '00:00:00', '00:00:00', 310, 333, 630),
(155, 564, '0000-00-00 00:00:00', 'Monday', 257, 'Laura', '00:00:00', '00:00:00', 310, 333, 712),
(156, 564, '0000-00-00 00:00:00', 'Monday', 258, 'Alexia', '00:00:00', '00:00:00', 310, 333, 713),
(163, 569, '0000-00-00 00:00:00', 'Saturday', 268, 'SBRadmin', '00:00:00', '00:00:00', 372, 393, 728),
(164, 569, '0000-00-00 00:00:00', 'Saturday', 269, 'swararaj', '00:00:00', '00:00:00', 372, 393, 729),
(165, 569, '0000-00-00 00:00:00', 'Saturday', 270, 'Deepraj', '00:00:00', '00:00:00', 372, 393, 730),
(166, 569, '0000-00-00 00:00:00', 'Saturday', 271, 'Sharayu', '00:00:00', '00:00:00', 372, 393, 731),
(167, 569, '0000-00-00 00:00:00', 'Saturday', 272, 'Vinit', '00:00:00', '00:00:00', 372, 393, 732),
(168, 569, '0000-00-00 00:00:00', 'Saturday', 273, 'Swaraj', '00:00:00', '00:00:00', 372, 393, 733),
(172, 572, '2017-07-25 09:30:23', 'Tuesday', 129, 'Amol Agre', '09:00:00', '00:30:23', 278, 301, 542),
(173, 572, '0000-00-00 00:00:00', 'Tuesday', 277, 'Nagendra', '00:00:00', '00:00:00', 278, 301, 737),
(174, 572, '0000-00-00 00:00:00', 'Tuesday', 278, 'Sanjeev', '00:00:00', '00:00:00', 278, 301, 738),
(175, 573, '0000-00-00 00:00:00', 'Wednesday', 263, 'Sunil', '00:00:00', '00:00:00', 370, 391, 721),
(176, 573, '2017-07-26 09:40:17', 'Wednesday', 274, 'Prachi', '00:00:00', '00:00:00', 370, 391, 734),
(177, 573, '0000-00-00 00:00:00', 'Wednesday', 275, 'Pradnya', '00:00:00', '00:00:00', 370, 391, 735),
(178, 573, '0000-00-00 00:00:00', 'Wednesday', 276, 'Kumar', '00:00:00', '00:00:00', 370, 391, 736),
(212, 578, '0000-00-00 00:00:00', 'Monday', 1, 'DEMOadmi', '00:00:00', '00:00:00', 151, 149, 254),
(213, 578, '0000-00-00 00:00:00', 'Monday', 3, 'vishal pandey', '00:00:00', '00:00:00', 151, 149, 297),
(214, 578, '0000-00-00 00:00:00', 'Monday', 4, 'Aakash shah', '00:00:00', '00:00:00', 151, 149, 309),
(215, 578, '0000-00-00 00:00:00', 'Monday', 5, 'maxsteel john', '05:00:00', '00:00:00', 151, 149, 310),
(216, 578, '0000-00-00 00:00:00', 'Monday', 6, 'mrzero', '00:00:00', '00:00:00', 151, 149, 318),
(217, 578, '0000-00-00 00:00:00', 'Monday', 7, 'Ruffy', '00:00:00', '00:00:00', 151, 149, 319),
(218, 578, '0000-00-00 00:00:00', 'Monday', 8, 'Anderson', '00:00:00', '00:00:00', 151, 149, 320),
(219, 578, '0000-00-00 00:00:00', 'Monday', 9, 'Vivek', '00:00:00', '00:00:00', 151, 149, 321),
(220, 578, '0000-00-00 00:00:00', 'Monday', 10, '', '00:00:00', '00:00:00', 151, 149, 322),
(221, 578, '0000-00-00 00:00:00', 'Monday', 11, 'Walker', '00:00:00', '00:00:00', 151, 149, 323),
(222, 578, '0000-00-00 00:00:00', 'Monday', 12, 'Bipin', '00:00:00', '00:00:00', 151, 149, 327),
(223, 578, '0000-00-00 00:00:00', 'Monday', 13, 'Vishal', '00:00:00', '00:00:00', 151, 149, 328),
(224, 578, '0000-00-00 00:00:00', 'Monday', 14, 'river', '00:00:00', '00:00:00', 151, 149, 329),
(225, 578, '0000-00-00 00:00:00', 'Monday', 15, 'neha', '00:00:00', '00:00:00', 151, 149, 331),
(226, 578, '0000-00-00 00:00:00', 'Monday', 16, 'nehapandey', '00:00:00', '00:00:00', 151, 149, 332),
(227, 578, '0000-00-00 00:00:00', 'Monday', 17, 'neha12', '00:00:00', '00:00:00', 151, 149, 333),
(228, 578, '0000-00-00 00:00:00', 'Monday', 18, 'neha14', '00:00:00', '00:00:00', 151, 149, 334),
(229, 578, '0000-00-00 00:00:00', 'Monday', 19, 'neha0404', '00:00:00', '00:00:00', 151, 149, 335),
(230, 578, '0000-00-00 00:00:00', 'Monday', 20, 'neha', '00:00:00', '00:00:00', 151, 149, 336),
(231, 578, '0000-00-00 00:00:00', 'Monday', 21, 'Jimmy', '00:00:00', '00:00:00', 151, 149, 342),
(232, 578, '0000-00-00 00:00:00', 'Monday', 22, '', '00:00:00', '00:00:00', 151, 149, 343),
(233, 578, '0000-00-00 00:00:00', 'Monday', 23, '', '00:00:00', '00:00:00', 151, 149, 344),
(234, 578, '0000-00-00 00:00:00', 'Monday', 63, 'depika', '00:00:00', '00:00:00', 151, 149, 408),
(235, 578, '0000-00-00 00:00:00', 'Monday', 162, 'DemoUser149', '00:00:00', '00:00:00', 151, 149, 567),
(236, 578, '0000-00-00 00:00:00', 'Monday', 164, 'lahsiv21', '00:00:00', '00:00:00', 151, 149, 579),
(237, 578, '0000-00-00 00:00:00', 'Monday', 166, 'sameerp', '00:00:00', '00:00:00', 151, 149, 583),
(238, 578, '0000-00-00 00:00:00', 'Monday', 167, 'Aditya', '00:00:00', '00:00:00', 151, 149, 584),
(239, 578, '0000-00-00 00:00:00', 'Monday', 168, 'Jimbei', '09:00:00', '00:00:00', 151, 149, 296),
(240, 578, '0000-00-00 00:00:00', 'Monday', 169, 'vishal', '00:00:00', '00:00:00', 151, 149, 297),
(241, 578, '0000-00-00 00:00:00', 'Monday', 170, 'Aakash', '09:00:00', '00:00:00', 151, 149, 309),
(242, 578, '0000-00-00 00:00:00', 'Monday', 172, 'shraddhar', '00:00:00', '00:00:00', 151, 149, 585),
(243, 578, '0000-00-00 00:00:00', 'Monday', 279, 'maxsteel', '00:00:00', '00:00:00', 151, 149, 310),
(244, 578, '0000-00-00 00:00:00', 'Monday', 280, 'priya', '00:00:00', '00:00:00', 151, 149, 404);

--
-- Triggers `late_coming_daily_summary`
--
DELIMITER $$
CREATE TRIGGER `delete_late_coming_daily_summary_aud` AFTER DELETE ON `late_coming_daily_summary` FOR EACH ROW BEGIN

INSERT INTO `late_coming_daily_summary_aud`
(`LCDS_ID`, `ATTEND_CALENDAR_ID`, `PUNCH_IN_UTC_TIME`, `DAY_NM`, `ATTND_EMP_ID`, `ATTND_EMP_NAME`,`SHIFT_TIME`,`LATE_BY`,`OA_ID`,`OA_BRAND_ID`, `USER_ID`,`ACTIONMODE`) 
VALUES 
(old.`LCDS_ID`, old.`ATTEND_CALENDAR_ID`, old.`PUNCH_IN_UTC_TIME`, old.`DAY_NM`, old.`ATTND_EMP_ID`, old.`ATTND_EMP_NAME`,old.`SHIFT_TIME`,old.`LATE_BY`,old.`OA_ID`,old.`OA_BRAND_ID`, old.`USER_ID`, 'D');

END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `insert_late_coming_daily_summary_aud` AFTER INSERT ON `late_coming_daily_summary` FOR EACH ROW BEGIN

INSERT INTO `late_coming_daily_summary_aud`
(`LCDS_ID`, `ATTEND_CALENDAR_ID`, `PUNCH_IN_UTC_TIME`, `DAY_NM`, `ATTND_EMP_ID`, `ATTND_EMP_NAME`,`SHIFT_TIME`,`LATE_BY`,`OA_ID`,`OA_BRAND_ID`, `USER_ID`,`ACTIONMODE`) 
VALUES 
(new.`LCDS_ID`, new.`ATTEND_CALENDAR_ID`, new.`PUNCH_IN_UTC_TIME`, new.`DAY_NM`, new.`ATTND_EMP_ID`, new.`ATTND_EMP_NAME`,new.`SHIFT_TIME`,new.`LATE_BY`,new.`OA_ID`,new.`OA_BRAND_ID`, new.`USER_ID`, 'I');

END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_late_coming_daily_summary_aud` AFTER UPDATE ON `late_coming_daily_summary` FOR EACH ROW BEGIN

INSERT INTO `late_coming_daily_summary_aud`
(`LCDS_ID`, `ATTEND_CALENDAR_ID`, `PUNCH_IN_UTC_TIME`, `DAY_NM`, `ATTND_EMP_ID`, `ATTND_EMP_NAME`,`SHIFT_TIME`,`LATE_BY`,`OA_ID`,`OA_BRAND_ID`, `USER_ID`,`ACTIONMODE`) 
VALUES 
(new.`LCDS_ID`, new.`ATTEND_CALENDAR_ID`, new.`PUNCH_IN_UTC_TIME`, new.`DAY_NM`, new.`ATTND_EMP_ID`, new.`ATTND_EMP_NAME`,new.`SHIFT_TIME`,new.`LATE_BY`,new.`OA_ID`,new.`OA_BRAND_ID`, new.`USER_ID`, 'U');

END
$$
DELIMITER ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `late_coming_daily_summary`
--
ALTER TABLE `late_coming_daily_summary`
  ADD PRIMARY KEY (`LCDS_ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `late_coming_daily_summary`
--
ALTER TABLE `late_coming_daily_summary`
  MODIFY `LCDS_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=245;
/*!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 */;
