--
-- Host: localhost    Database: actmed_hrms
-- ------------------------------------------------------


--
-- Table structure for table `access`
--

CREATE TABLE `access` (
  `AccessID` int(11) NOT NULL,
  `RoleID` int(11) NOT NULL,
  `RoleShortCode` varchar(2) NOT NULL,
  `MenuID` bigint(20) NOT NULL,
  `Access` enum('Y','N') NOT NULL DEFAULT 'Y'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `access`
--


--
-- Table structure for table `approvals`
--

CREATE TABLE `approvals` (
  `Approvals_id` int(11) NOT NULL AUTO_INCREMENT,
  `FormType` varchar(40) NOT NULL,
  `FormID` int(20) NOT NULL,
  `EmployeeCode` varchar(40) NOT NULL,
  `EmployeeName` varchar(40) NOT NULL,
  `ReasonForLeave` varchar(40) NOT NULL,
  `Status` enum('pending','approved','rejected') NOT NULL,
  `ReasonForRejection` varchar(100) NOT NULL,
  `Department` varchar(40) NOT NULL,
  `EmployeeType` varchar(2) NOT NULL,
  `RequestedOn` date NOT NULL,
  `approval_reason` varchar(500) NOT NULL,
  `del_flag` tinyint(1) NOT NULL,
  PRIMARY KEY (`Approvals_id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `approvals`
--

INSERT INTO `approvals` VALUES (1,'Leave',1,'EQC1111460','Ganesan','Personal Leave','pending','','6','Pe','2018-02-22','',1),(2,'Leave',2,'EQC1111460','Ganesan','Test Leave','pending','','6','Pe','2018-02-22','',1),(3,'Leave',3,'EMM0118634','Sankaralingam','sdfsd','pending','','3','Pr','2018-02-22','',0),(4,'Permission',1,'EMM0118634','Sankaralingam','234242','pending','','3','Pr','2018-02-22','',0),(5,'Permission',2,'EMM0118634','Sankaralingam','daedadsdd','pending','','3','Pr','2018-02-22','',0),(6,'Leave',4,'EMM0118634','Sankaralingam','sdfsd','pending','','3','Pr','2018-02-22','',0),(7,'Leave',5,'EMM0118634','Sankaralingam','sf','pending','','3','Pr','2018-02-22','',0),(8,'Permission',3,'EMM0118634','Sankaralingam','sdfdsd','pending','','3','Pr','2018-02-22','',0),(9,'Permission',4,'EMM0118634','Sankaralingam','asdas','pending','','3','Pr','2018-02-22','',0),(10,'Permission',5,'EMM0817623','Pravinraj','qewqwqw','pending','','3','Pr','2018-02-22','',0),(11,'Permission',6,'EMM0817623','Pravinraj','kkkkk','pending','','3','Pr','2018-02-22','',0),(12,'Leave',6,'EQC1111460','Ganesan','work frm home','approved','','6','Pe','2018-02-22','Approved',0),(13,'Permission',7,'EQC1111460','Ganesan','went hospital','pending','','6','Pe','2018-02-22','',0);

--
-- Table structure for table `country`
--

CREATE TABLE `country` (
  `country_id` int(11) NOT NULL AUTO_INCREMENT,
  `country_name` varchar(50) NOT NULL,
  `country_abbrev` varchar(3) NOT NULL,
  PRIMARY KEY (`country_id`)
) ENGINE=InnoDB AUTO_INCREMENT=236 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `country`
--

INSERT INTO `country` VALUES (1,'Afghanistan','AF'),(2,'Albania','AL'),(3,'Algeria','DZ'),(4,'American Somoa','AS'),(5,'Andorra','AD'),(6,'Angola','AO'),(7,'Anguilla','AI'),(8,'Antarctica','AQ'),(9,'Antigua and Barbuda','AG'),(10,'Argentina','AR'),(11,'Armenia','AM'),(12,'Aruba','AW'),(13,'Australia','AU'),(14,'Austria','AT'),(15,'Bahamas','BS'),(16,'Bahrain','BH'),(17,'Bangladesh','BD'),(18,'Barbados','BB'),(19,'Belarus','BY'),(20,'Belgium','BE'),(21,'Belize','BZ'),(22,'Benin','BJ'),(23,'Bermuda','BM'),(24,'Bhutan','BT'),(25,'Bolivia','BO'),(26,'Bosnia and Herzegovina','BA'),(27,'Botswana','BW'),(28,'Bouvet Island','BV'),(29,'Brazil','BR'),(30,'British Indian Ocean Territory','IO'),(31,'Brunei Darussalam','BN'),(32,'Bulgaria','BG'),(33,'Burkina Faso','BF'),(34,'Burundi','BI'),(35,'Cambodia','KH'),(36,'Cameroon','CM'),(37,'Canada','CA'),(38,'Cape Verde','CV'),(39,'Cayman Islands','KY'),(40,'Central African Republic','CF'),(41,'Chad','TD'),(42,'Chile','CL'),(43,'China','CN'),(44,'Christmas Island','CX'),(45,'Cocos (Keeling) Islands','CC'),(46,'Colombia','CO'),(47,'Comoros','KM'),(48,'Congo','CG'),(49,'Cook Islands','CK'),(50,'Costa Rica','CR'),(51,'Croatia','HR'),(52,'Cuba','CU'),(53,'Cyprus','CY'),(54,'Czech Republic','CZ'),(55,'Denmark','DK'),(56,'Djibouti','DJ'),(57,'Dominica','DM'),(58,'Dominican Republic','DO'),(59,'East Timor','TP'),(60,'Ecuador','EC'),(61,'Egypt','EG'),(62,'El Salvador','SV'),(63,'Equatorial Guinea','GQ'),(64,'Eritrea','ER'),(65,'Estonia','EE'),(66,'Ethiopia','ET'),(67,'Faroe Islands','FO'),(68,'Falkland Islands','FK'),(69,'Fiji','FJ'),(70,'Finland','FI'),(71,'France','FR'),(72,'French Guiana','GF'),(73,'French Polynesia','PF'),(74,'French Southern and Antarctic Lands','FQ'),(75,'Gabon','GA'),(76,'Gambia','GM'),(77,'Georgia','GE'),(78,'Germany','DE'),(79,'Ghana','GH'),(80,'Gibraltar','GI'),(81,'Greece','GR'),(82,'Greenland','GL'),(83,'Grenada','GD'),(84,'Guadaloupe','GP'),(85,'Guam','GU'),(86,'Guatemala','GT'),(87,'Guinea','GN'),(88,'Guinea-Bissau','GW'),(89,'Guyana','GY'),(90,'Haiti','HT'),(91,'Heard Island and McDonald Islands','HM'),(92,'Honduras','HN'),(93,'Hong Kong','HK'),(94,'Hungary','HU'),(95,'Iceland','IS'),(96,'India','IN'),(97,'Indonesia','ID'),(98,'Iran','IR'),(99,'Iraq','IQ'),(100,'Ireland','IE'),(101,'Israel','IL'),(102,'Italy','IT'),(103,'Ivory Coast','CI'),(104,'Jamaica','JM'),(105,'Japan','JP'),(106,'Jordan','JO'),(107,'Kazakhstan','KZ'),(108,'Kenya','KE'),(109,'North Korea','KP'),(110,'South Korea','KR'),(111,'Kuwait','KW'),(112,'Kyrgyzstan','KG'),(113,'Laos','LA'),(114,'Latvia','LV'),(115,'Lebanon','LN'),(116,'Lesotho','LS'),(117,'Liberia','LR'),(118,'Libya','LY'),(119,'Liechtenstein','LI'),(120,'Lithuania','LT'),(121,'Luxembourg','LU'),(122,'Macau','MO'),(123,'Macedonia','MK'),(124,'Madagascar','MG'),(125,'Malawi','MW'),(126,'Malaysia','MY'),(127,'Maldives','MV'),(128,'Mali','ML'),(129,'Malta','MT'),(130,'Marshall Islands','MH'),(131,'Martinique','MQ'),(132,'Mauritania','MR'),(133,'Mauritius','MU'),(134,'Mayotte','YT'),(135,'Mexico','MX'),(136,'Micronesia','FM'),(137,'Moldova','MD'),(138,'Monaco','MC'),(139,'Mongolia','MN'),(140,'Montserrat','MS'),(141,'Morocco','MA'),(142,'Mozambique','MZ'),(143,'Myanmar','MM'),(144,'Namibia','NA'),(145,'Nauru','NR'),(146,'Nepal','NP'),(147,'Netherlands','NL'),(148,'Netherlands Antilles','AN'),(149,'New Caledonia','NC'),(150,'New Hebrides','NH'),(151,'New Zealand','NZ'),(152,'Nicaragua','NI'),(153,'Niger','NE'),(154,'Nigeria','NG'),(155,'Niue','NU'),(156,'Norfolk Island','NF'),(157,'Norway','NO'),(158,'Oman','OM'),(159,'Pakistan','PK'),(160,'Palau','PW'),(161,'Panama','PA'),(162,'Papua New Guinea','PG'),(163,'Paraguay','PY'),(164,'Peru','PE'),(165,'Philippines','PH'),(166,'Pitcairn','PN'),(167,'Poland','PL'),(168,'Portugal','PT'),(169,'Puerto Rico','PR'),(170,'Qatar','QA'),(171,'Reunion','RE'),(172,'Romania','RO'),(173,'Russia','RU'),(174,'Rwanda','RW'),(175,'St. Christopher-Nevis-Anguilla','KN'),(176,'St. Helena','SH'),(177,'St. Lucia','LC'),(178,'St. Pierre and Miquelon','PM'),(179,'St. Vincent','VC'),(180,'Samoa','WS'),(181,'San Marino','SM'),(182,'Sao Tome and Principe','ST'),(183,'Saudi Arabia','SA'),(184,'Senegal','SN'),(185,'Seychelles','SC'),(186,'Sierra Leone','SL'),(187,'Singapore','SG'),(188,'Slovakia','SK'),(189,'Slovenia','SI'),(190,'Solomon Islands','SB'),(191,'Somalia','SO'),(192,'South Africa','ZA'),(193,'Spain','ES'),(194,'Sri Lanka','LK'),(195,'Sudan','SD'),(196,'Surinam','SR'),(197,'Svalbard and Jan Mayen','SJ'),(198,'Swaziland','SZ'),(199,'Sweden','SE'),(200,'Switzerland','CH'),(201,'Syria','SY'),(202,'Taiwan','TW'),(203,'Tajikistan','TJ'),(204,'Tanzania','TZ'),(205,'Thailand','TH'),(206,'Togo','TG'),(207,'Tokelau Islands','TK'),(208,'Tonga','TO'),(209,'Trinidad and Tobago','TT'),(210,'Tunisia','TN'),(211,'Turkey','TR'),(212,'Turks and Caicos Islands','TC'),(213,'Tuvalu','TV'),(214,'Uganda','UG'),(215,'Ukraine','UA'),(216,'United Arab Emirates','AE'),(217,'United Kingdom','GB'),(218,'United state','US'),(219,'United state Miscellaneous Pacific Islands','PU'),(220,'Uruguay','UY'),(221,'Uzbekistan','UZ'),(222,'Vatican City','VA'),(223,'Venezuela','VE'),(224,'Vietnam','VN'),(225,'Virgin Islands (U.S.)','VI'),(226,'Wallis and Futana','WF'),(227,'Western Sahara','EH'),(228,'Yemen','YE'),(229,'Yugoslavia','YU'),(230,'Zaire','ZR'),(231,'Zambia','ZM'),(232,'Zimbabwe','ZW'),(233,'Serbia','RS'),(234,'Montenegro','ME'),(235,'Republika Srpska','RS2');

--
-- Table structure for table `defaultsettings`
--

CREATE TABLE `defaultsettings` (
  `SetID` int(11) NOT NULL AUTO_INCREMENT,
  `SetVariable` varchar(200) NOT NULL,
  `SetValue` varchar(200) NOT NULL,
  `SetStatus` enum('Y','N') NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`SetID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `defaultsettings`
--

INSERT INTO `defaultsettings` VALUES (1,'ADMIN_EMAIL','jana@amulya.biz','Y'),(2,'MONITOR_EMAIL','jana@actmedia.net','Y');

--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `DepID` int(11) NOT NULL AUTO_INCREMENT,
  `DepartmentName` varchar(45) DEFAULT NULL,
  `Description` varchar(45) DEFAULT NULL,
  `DepartmentHead` int(11) DEFAULT NULL,
  `DepartmentTeamMail` varchar(100) DEFAULT NULL,
  `OrganizationID` int(11) DEFAULT NULL,
  `DepartmentParentID` int(11) DEFAULT NULL,
  PRIMARY KEY (`DepID`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` VALUES (1,'Enterprise Services',NULL,1,'vasanth@amulya.biz ',NULL,NULL),(2,'Amulya IT',NULL,5,'mike@amulya.biz',NULL,NULL),(3,'Amulya Soft',NULL,5,'mike@amulya.biz',NULL,NULL),(4,'Business Development',NULL,0,'sathish@amulya.biz',NULL,NULL),(5,'HR',NULL,43,'hr@amulya.biz',NULL,NULL),(6,'Quality',NULL,43,'shiji.kumaran@amulya.biz',NULL,NULL),(7,'System Admin',NULL,32,'sathishkannan@amulya.biz',NULL,NULL),(8,'General Admin',NULL,42,'sunil@amulya.biz',NULL,NULL);

--
-- Table structure for table `designation`
--

CREATE TABLE `designation` (
  `DesignationID` int(11) NOT NULL AUTO_INCREMENT,
  `DesignationName` varchar(50) DEFAULT NULL,
  `DepartmentID` int(11) DEFAULT NULL,
  PRIMARY KEY (`DesignationID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `designation`
--


--
-- Table structure for table `education`
--

CREATE TABLE `education` (
  `EduID` int(11) NOT NULL AUTO_INCREMENT,
  `EmpID` int(11) DEFAULT NULL,
  `Degree` varchar(150) DEFAULT NULL,
  `Specialization` varchar(150) DEFAULT NULL,
  `GraduationYear` year(4) DEFAULT NULL,
  `Percentage` varchar(45) DEFAULT NULL,
  `College` varchar(45) DEFAULT NULL,
  `University` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`EduID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `education`
--


--
-- Table structure for table `latearrival`
--

CREATE TABLE `latearrival` (
  `LateArrivalID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
  `EmpID` varchar(20) NOT NULL,
  `LateArrivalDate` date NOT NULL,
  `ReportingTime` varchar(10) NOT NULL,
  `DurationInMinutes` int(10) NOT NULL,
  `Reason` varchar(40) NOT NULL,
  `InformedThrough` varchar(20) DEFAULT NULL,
  `InformedTo` varchar(20) DEFAULT NULL,
  `Status` enum('pending','approved','rejected') NOT NULL,
  PRIMARY KEY (`LateArrivalID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `latearrival`
--

INSERT INTO `latearrival` VALUES (0000000001,'546565656','2013-04-08','11-12',10,'hiii','NA','NA','pending'),(0000000002,'546565656','0000-00-00','',0,'','NA','NA','pending');

--
-- Table structure for table `leave`
--

CREATE TABLE `leave` (
  `LeaveID` int(11) NOT NULL AUTO_INCREMENT,
  `EmpID` varchar(50) DEFAULT NULL,
  `LeaveType` varchar(40) DEFAULT NULL,
  `ReasonForLeave` varchar(250) DEFAULT NULL,
  `LeaveFrom` date DEFAULT NULL,
  `LeaveTill` date DEFAULT NULL,
  `HoursTaken` varchar(45) DEFAULT NULL,
  `Status` enum('pending','approved','rejected') NOT NULL,
  `del_flag` tinyint(1) NOT NULL,
  PRIMARY KEY (`LeaveID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `leave`
--


--
-- Table structure for table `leavetype`
--

CREATE TABLE `leavetype` (
  `LeaveTypeID` int(11) NOT NULL AUTO_INCREMENT,
  `LeaveType` varchar(45) DEFAULT NULL,
  `MaximumLeave` int(11) DEFAULT NULL,
  `Remarks` varchar(45) DEFAULT NULL,
  `OrgID` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`LeaveTypeID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `leavetype`
--

INSERT INTO `leavetype` VALUES (1,'Casual Leave',NULL,NULL,NULL),(2,'Unpaid Leave (LOP)',NULL,NULL,NULL),(3,'Sick Leave',NULL,NULL,NULL),(4,'Compensatory Leave',NULL,NULL,NULL),(5,'Onduty',NULL,NULL,NULL);

--
-- Table structure for table `menus`
--

CREATE TABLE `menus` (
  `MenuID` bigint(20) NOT NULL AUTO_INCREMENT,
  `MenuName` varchar(200) NOT NULL,
  `MenuLink` varchar(255) NOT NULL,
  `Status` enum('Y','N') NOT NULL DEFAULT 'Y',
  `ParentID` int(10) NOT NULL,
  PRIMARY KEY (`MenuID`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `menus`
--

INSERT INTO `menus` VALUES (1,'logout','logout','Y',0),(2,'main','main','Y',0),(3,'login','login','Y',0),(4,'viewemployees','viewemployees','Y',0),(5,'client','client','Y',0),(6,'alert','alert','Y',0),(7,'report','report','Y',0),(8,'settings','settings','Y',0),(9,'pagination','pagination','Y',0),(10,'Add Employee','employee','Y',4),(11,'viewemployees/employee','viewemployees/employee','Y',0);

--
-- Table structure for table `organization`
--

CREATE TABLE `organization` (
  `OrgID` int(11) NOT NULL AUTO_INCREMENT,
  `OrganizationName` varchar(100) DEFAULT NULL,
  `OrganizationDescription` blob,
  `OrganizationMainUser` int(11) DEFAULT NULL,
  `OrganizationAddress` varchar(250) DEFAULT NULL,
  `OrganizationCity` varchar(55) DEFAULT NULL,
  `OrganizationState` varchar(55) DEFAULT NULL,
  `OrganizationCountry` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`OrgID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `organization`
--


--
-- Table structure for table `permission`
--

CREATE TABLE `permission` (
  `PermissionID` int(11) NOT NULL AUTO_INCREMENT,
  `EmpID` varchar(50) DEFAULT NULL,
  `NoOfHours` varchar(10) DEFAULT NULL,
  `PermissionDate` date DEFAULT NULL,
  `ReasonForPermission` varchar(200) DEFAULT NULL,
  `PermissionTime` varchar(45) DEFAULT NULL,
  `InformedThrough` varchar(45) DEFAULT NULL,
  `InformedTo` varchar(65) DEFAULT NULL,
  `Status` enum('pending','approved','rejected') NOT NULL,
  `del_flag` tinyint(1) NOT NULL,
  PRIMARY KEY (`PermissionID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `permission`
--


--
-- Table structure for table `role`
--

CREATE TABLE `role` (
  `RoleID` int(3) NOT NULL AUTO_INCREMENT,
  `RoleName` varchar(200) NOT NULL,
  `RoleShortCode` varchar(2) NOT NULL,
  `Status` enum('Y','N') NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`RoleID`),
  UNIQUE KEY `RoleShortCode` (`RoleShortCode`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `role`
--

INSERT INTO `role` VALUES (1,'MasterUser','MU','Y'),(2,'Administrator','AM','Y'),(3,'Department Head','DH','Y'),(4,'Human Resource','HR','Y'),(5,'Business Development','BD','Y'),(6,'Employee','EM','Y'),(7,'Trainee','TR','Y');

--
-- Table structure for table `workexperience`
--

CREATE TABLE `workexperience` (
  `WorkExpID` int(11) NOT NULL AUTO_INCREMENT,
  `Employer` varchar(250) DEFAULT NULL,
  `JobTitle` varchar(100) DEFAULT NULL,
  `FromDate` date DEFAULT NULL,
  `ToDate` date DEFAULT NULL,
  `EmpID` int(11) DEFAULT NULL,
  PRIMARY KEY (`WorkExpID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `workexperience`
--



