/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50505
Source Host           : localhost:3306
Source Database       : linxleave_company_1

Target Server Type    : MYSQL
Target Server Version : 50505
File Encoding         : 65001

Date: 2024-04-24 15:50:05
*/


-- ----------------------------
-- Table structure for adjustment
-- ----------------------------
CREATE TABLE `adjustment` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `user_id` int(255) DEFAULT NULL,
  `days` varchar(255) DEFAULT NULL,
  `leave_type` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `createdBy_user_id` int(255) DEFAULT NULL,
  `sent_date` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `time` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of adjustment
-- ----------------------------
INSERT INTO `adjustment` VALUES ('1', '2', '4', 'ANNUAL', 'CONTRACT RENEW', 'ADD', '2', '2022-09-08', null, '17:21 PM', '2022-09-08');

-- ----------------------------
-- Table structure for announcement
-- ----------------------------
CREATE TABLE `announcement` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `date_from` varchar(255) DEFAULT NULL,
  `date_to` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `createdBy_user_id` varchar(255) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of announcement
-- ----------------------------

-- ----------------------------
-- Table structure for apply_date
-- ----------------------------
CREATE TABLE `apply_date` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `apply_leave_id` int(11) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  `option_day` varchar(255) DEFAULT NULL,
  `paid_unpaid` varchar(255) DEFAULT NULL,
  `replacement` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of apply_date
-- ----------------------------
INSERT INTO `apply_date` VALUES ('1', '2', '2022-09-09', 'PM', 'PAID', null);
INSERT INTO `apply_date` VALUES ('2', '3', '2022-09-29', 'FULL', 'PAID', null);

-- ----------------------------
-- Table structure for apply_leave
-- ----------------------------
CREATE TABLE `apply_leave` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `onbehalf` varchar(255) DEFAULT NULL,
  `approval1_id` int(11) DEFAULT 0,
  `approval2_id` int(11) DEFAULT 0,
  `approval3_id` int(11) DEFAULT 0,
  `days` varchar(255) DEFAULT NULL,
  `days_paid` varchar(255) DEFAULT NULL,
  `days_unpaid` varchar(255) DEFAULT NULL,
  `days_replacement` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `leave_type` varchar(255) DEFAULT NULL,
  `previous_leave` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `document` varchar(255) DEFAULT NULL,
  `app_date` varchar(50) DEFAULT NULL,
  `app_time` varchar(255) DEFAULT NULL,
  `reason_app` varchar(255) DEFAULT NULL,
  `sent_date` varchar(50) DEFAULT NULL,
  `createdBy_user_id` varchar(255) DEFAULT NULL,
  `withdraw1_id` int(255) DEFAULT 0,
  `withdraw2_id` int(255) DEFAULT 0,
  `withdraw3_id` int(11) DEFAULT 0,
  `autodeduct` varchar(255) NOT NULL,
  `autounpaid` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of apply_leave
-- ----------------------------
INSERT INTO `apply_leave` VALUES ('1', '3', 'DEFAULT', '0', '0', '0', '1', '1', '0', null, 'K', 'ANNUAL', null, 'PENDING', 'Array', null, null, null, '2018-12-31', '3', '0', '0', '0', '', '');
INSERT INTO `apply_leave` VALUES ('2', '2', 'DEFAULT', '0', '0', '0', '0.5', '0.5', '0', null, 'ANNUAL LEAVE', 'ANNUAL', null, 'PENDING', 'Array', null, null, null, '2022-09-08', '2', '0', '0', '0', '', '');
INSERT INTO `apply_leave` VALUES ('3', '4', 'DEFAULT', '0', '0', '0', '1', '1', '0', null, 'PERSONAL MATTER', 'ANNUAL', null, 'PENDING', 'Array', null, null, null, '2022-09-15', '4', '0', '0', '0', '', '');

-- ----------------------------
-- Table structure for approved_by
-- ----------------------------
CREATE TABLE `approved_by` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `approval1_id` int(11) DEFAULT NULL,
  `approval2_id` int(11) DEFAULT NULL,
  `approval3_id` int(11) DEFAULT NULL,
  `approval_type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of approved_by
-- ----------------------------
INSERT INTO `approved_by` VALUES ('1', '2', '3', '0', '0', 'EITHER');
INSERT INTO `approved_by` VALUES ('2', '3', '3', '0', '0', 'EITHER');
INSERT INTO `approved_by` VALUES ('3', '4', '3', null, null, 'EITHER');
INSERT INTO `approved_by` VALUES ('4', '5', '0', null, null, 'EITHER');
INSERT INTO `approved_by` VALUES ('5', '6', '0', null, null, 'EITHER');
INSERT INTO `approved_by` VALUES ('6', '7', '0', null, null, 'EITHER');
INSERT INTO `approved_by` VALUES ('7', '8', '0', null, null, 'EITHER');

-- ----------------------------
-- Table structure for branch
-- ----------------------------
CREATE TABLE `branch` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `company_id` int(255) DEFAULT NULL,
  `branch_code` varchar(255) DEFAULT NULL,
  `branch` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `remarks` varchar(255) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of branch
-- ----------------------------
INSERT INTO `branch` VALUES ('2', '1', 'LB001', 'KUCHING', 'LINX KUCHING', '', '2018-02-20', '13:23 PM');
INSERT INTO `branch` VALUES ('5', '1', 'LB003', 'SIBU', 'LINX SIBU', '', '2018-02-20', '13:23 PM');

-- ----------------------------
-- Table structure for company_picture
-- ----------------------------
CREATE TABLE `company_picture` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `user_id` int(100) DEFAULT NULL,
  `company_photo` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of company_picture
-- ----------------------------

-- ----------------------------
-- Table structure for company_profile
-- ----------------------------
CREATE TABLE `company_profile` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(255) DEFAULT NULL,
  `reg_no` varchar(255) DEFAULT NULL,
  `dob` varchar(255) DEFAULT NULL,
  `company_address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `country` varchar(255) DEFAULT NULL,
  `phone_code` varchar(100) DEFAULT NULL,
  `phone_no` varchar(255) DEFAULT NULL,
  `fax_code` varchar(100) DEFAULT NULL,
  `fax_no` varchar(255) DEFAULT NULL,
  `person_in_charge` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `second_email` varchar(255) DEFAULT NULL,
  `website_address` varchar(255) DEFAULT NULL,
  `company_photo` varchar(255) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of company_profile
-- ----------------------------
INSERT INTO `company_profile` VALUES ('1', 'LinxSystem Testing Sdn Bhd', 'Z85509-A', null, 'LOT 90, LINX TOWER, 92100, KUCHING, SARAWAK, MALAYSIA', 'KUCHING', 'SARAWAK', 'MALAYSIA', '082', '365577', '082', '365577', 'linxleave@linx.com.my', 'linxleave@linx.com.my', 'linxleave@linx.com.my', '', 'dummy-logo-300x140.png', '2017-12-12', '14:43 PM');

-- ----------------------------
-- Table structure for dashboard_duty
-- ----------------------------
CREATE TABLE `dashboard_duty` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_user` varchar(255) NOT NULL,
  `onduty` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of dashboard_duty
-- ----------------------------

-- ----------------------------
-- Table structure for dashboard_leave
-- ----------------------------
CREATE TABLE `dashboard_leave` (
  `id` int(11) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `department` varchar(255) NOT NULL,
  `mindate` varchar(255) NOT NULL,
  `maxdate` varchar(255) NOT NULL,
  `days` varchar(255) NOT NULL,
  `leave_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of dashboard_leave
-- ----------------------------

-- ----------------------------
-- Table structure for defaults
-- ----------------------------
CREATE TABLE `defaults` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  `status` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of defaults
-- ----------------------------
INSERT INTO `defaults` VALUES ('1', 'annual', '14', '0');
INSERT INTO `defaults` VALUES ('5', 'maternity', '60', '0');
INSERT INTO `defaults` VALUES ('6', 'paternity', '3', '0');
INSERT INTO `defaults` VALUES ('14', 'sick', '14', '0');
INSERT INTO `defaults` VALUES ('15', 'hospitalization', '60', '0');
INSERT INTO `defaults` VALUES ('24', 'carry forward', '0', '0');

-- ----------------------------
-- Table structure for department
-- ----------------------------
CREATE TABLE `department` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `depart_id` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `remarks` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of department
-- ----------------------------
INSERT INTO `department` VALUES ('1', null, '', 'PROGRAMMING', null, '');
INSERT INTO `department` VALUES ('2', null, '', 'DESIGNING', null, '');
INSERT INTO `department` VALUES ('3', null, '', 'ADMINSTRATION', null, '');
INSERT INTO `department` VALUES ('4', null, '', 'ACCOUNTANCY', null, '');
INSERT INTO `department` VALUES ('5', null, '', 'SALES & MARKETING', '', '');
INSERT INTO `department` VALUES ('13', null, '', 'HR DEPARTMENT', null, 'HUMAN RESOURCE');

-- ----------------------------
-- Table structure for entitlement_basis
-- ----------------------------
CREATE TABLE `entitlement_basis` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `eb_name` varchar(255) DEFAULT NULL,
  `eb_value` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of entitlement_basis
-- ----------------------------

-- ----------------------------
-- Table structure for history
-- ----------------------------
CREATE TABLE `history` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `apply_leave_id` varchar(255) DEFAULT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `time` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `notified` tinyint(1) DEFAULT NULL,
  `mobile` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of history
-- ----------------------------
INSERT INTO `history` VALUES ('1', '1', '3', 'APPLIED', '15:22 PM', '2018-12-31', 'K', null, null);
INSERT INTO `history` VALUES ('2', '2', '2', 'APPLIED', '16:58 PM', '2022-09-08', 'ANNUAL LEAVE', null, null);
INSERT INTO `history` VALUES ('3', '3', '4', 'APPLIED', '08:45 AM', '2022-09-15', 'PERSONAL MATTER', null, null);

-- ----------------------------
-- Table structure for holiday
-- ----------------------------
CREATE TABLE `holiday` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `date_from` varchar(30) DEFAULT NULL,
  `day_from` varchar(30) DEFAULT NULL,
  `date_to` varchar(30) DEFAULT NULL,
  `day_to` varchar(30) DEFAULT NULL,
  `day` int(11) DEFAULT NULL,
  `remarks` varchar(200) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of holiday
-- ----------------------------
INSERT INTO `holiday` VALUES ('11', 'PROPHET MUHAMMAD\\\'S BIRTHDAY', '2018-11-22', null, '2018-11-22', null, null, '', '2018-03-07', '11:00 AM');
INSERT INTO `holiday` VALUES ('10', 'CHRISTMAS', '2018-12-25', null, '2018-12-25', null, null, '', '2018-03-07', '10:57 AM');

-- ----------------------------
-- Table structure for increment
-- ----------------------------
CREATE TABLE `increment` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `leave_type` varchar(255) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `default_entitlement` int(255) DEFAULT NULL,
  `morethanyear` int(255) DEFAULT NULL,
  `leave_entitlement` varchar(255) DEFAULT NULL,
  `createdBy_user_id` varchar(255) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of increment
-- ----------------------------

-- ----------------------------
-- Table structure for isseen
-- ----------------------------
CREATE TABLE `isseen` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `seen_apply_id` int(11) DEFAULT NULL,
  `seen_approval1_id` int(11) DEFAULT NULL,
  `seen_approval2_id` int(11) DEFAULT NULL,
  `seen_staff_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of isseen
-- ----------------------------

-- ----------------------------
-- Table structure for leave_planner
-- ----------------------------
CREATE TABLE `leave_planner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `sent_date` varchar(255) DEFAULT NULL,
  `leave_type` varchar(255) DEFAULT NULL,
  `days` varchar(255) DEFAULT NULL,
  `days_paid` varchar(255) DEFAULT NULL,
  `days_unpaid` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `document` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of leave_planner
-- ----------------------------

-- ----------------------------
-- Table structure for leave_setting
-- ----------------------------
CREATE TABLE `leave_setting` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `company_id` int(100) DEFAULT NULL,
  `entitlement` varchar(255) DEFAULT NULL,
  `rounding` varchar(255) DEFAULT NULL,
  `year_start` varchar(255) DEFAULT NULL,
  `carry_forward` varchar(100) DEFAULT NULL,
  `max_carry` int(100) DEFAULT NULL,
  `expired` varchar(100) DEFAULT NULL,
  `half_day` varchar(100) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  `expired_carryForward` varchar(255) DEFAULT NULL,
  `start_date` varchar(255) DEFAULT NULL,
  `reset` varchar(100) DEFAULT NULL,
  `update_by` varchar(255) DEFAULT NULL,
  `autodeduct` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of leave_setting
-- ----------------------------
INSERT INTO `leave_setting` VALUES ('1', '1', 'FULL', 'DOWN', 'JANUARY', 'YES', '5', '12', 'YES', '2018-07-02', '13:47 PM', '2018-01', '2017-01', '', '', 'NO');

-- ----------------------------
-- Table structure for leave_type
-- ----------------------------
CREATE TABLE `leave_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) DEFAULT NULL,
  `lt_type` varchar(25) DEFAULT NULL,
  `lt_type2` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of leave_type
-- ----------------------------

-- ----------------------------
-- Table structure for planner_date
-- ----------------------------
CREATE TABLE `planner_date` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `planner_id` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  `paid_unpaid` varchar(255) DEFAULT NULL,
  `option_day` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of planner_date
-- ----------------------------

-- ----------------------------
-- Table structure for position
-- ----------------------------
CREATE TABLE `position` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `name` varchar(1000) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `remarks` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of position
-- ----------------------------
INSERT INTO `position` VALUES ('1', 'MANAGING DIRECTOR', 'DIRECTING', 'DIRECTOR');
INSERT INTO `position` VALUES ('3', 'PROGRAMMER', 'PROGRAMMING', '');
INSERT INTO `position` VALUES ('4', 'DESIGNER', 'DESIGNING', '');
INSERT INTO `position` VALUES ('5', 'ADMINISTRATOR', 'ADMINISTRATION', '');
INSERT INTO `position` VALUES ('6', 'ACC CUM HR DIRECTOR', 'DIRECTOR', 'DIRECTOR');
INSERT INTO `position` VALUES ('7', 'SALES & MARKETING EXECUTIVE', '', '');
INSERT INTO `position` VALUES ('8', 'HUMAN RESOURCE', '', '');
INSERT INTO `position` VALUES ('9', 'ACCOUNTANT', '', '');
INSERT INTO `position` VALUES ('34', 'MANAGER', '', '');

-- ----------------------------
-- Table structure for replacement
-- ----------------------------
CREATE TABLE `replacement` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `user_id` int(255) DEFAULT NULL,
  `days` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `document` varchar(255) DEFAULT NULL,
  `createdBy_user_id` int(255) DEFAULT NULL,
  `sent_date` varchar(255) DEFAULT NULL,
  `time` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of replacement
-- ----------------------------

-- ----------------------------
-- Table structure for replacement_date
-- ----------------------------
CREATE TABLE `replacement_date` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `replacement_leave_id` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of replacement_date
-- ----------------------------

-- ----------------------------
-- Table structure for rounding
-- ----------------------------
CREATE TABLE `rounding` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `down` int(11) DEFAULT NULL,
  `near` int(11) DEFAULT NULL,
  `full` int(11) DEFAULT NULL,
  `half` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of rounding
-- ----------------------------

-- ----------------------------
-- Table structure for salut
-- ----------------------------
CREATE TABLE `salut` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `salut_type` varchar(20) DEFAULT NULL,
  `salut_gender` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of salut
-- ----------------------------

-- ----------------------------
-- Table structure for user
-- ----------------------------
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` varchar(100) DEFAULT NULL,
  `full_name` varchar(255) DEFAULT NULL,
  `ic_no` varchar(255) DEFAULT NULL,
  `dob` varchar(255) DEFAULT NULL,
  `contact_no` varchar(255) DEFAULT NULL,
  `marital_status` varchar(255) DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `salut` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', '', 'ADMIN', '', '', '', '', '', '', '', null);
INSERT INTO `user` VALUES ('2', '', 'EVELYN', '', '1970-01-01', '', 'SINGLE', 'FEMALE', 'MISS', '', 'evelyn.regasgroup@gmail.com');
INSERT INTO `user` VALUES ('3', '', 'Approval Admin', '', '1970-01-01', '', 'MARRIED', 'FEMALE', 'MISS', '', 'regashr2@gmail.com');
INSERT INTO `user` VALUES ('4', '', 'GAMMA', '', '1970-01-01', '', 'SINGLE', 'MALE', 'MR', '', 'gamma.auto2@gmail.com');
INSERT INTO `user` VALUES ('8', '', 'RAYMOND LAI TESTING', '', '1970-01-01', '', 'SINGLE', 'MALE', 'MR', '', 'raydev0012@gmail.com');

-- ----------------------------
-- Table structure for user_access_type
-- ----------------------------
CREATE TABLE `user_access_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_access_type
-- ----------------------------
INSERT INTO `user_access_type` VALUES ('1', 'ADMINISTRATOR');
INSERT INTO `user_access_type` VALUES ('2', 'APPROVAL');
INSERT INTO `user_access_type` VALUES ('3', 'STAFF');

-- ----------------------------
-- Table structure for user_emergency_details
-- ----------------------------
CREATE TABLE `user_emergency_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `relationship` varchar(255) DEFAULT NULL,
  `contact_no` varchar(100) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_emergency_details
-- ----------------------------
INSERT INTO `user_emergency_details` VALUES ('1', '2', '', '', '', '', '');
INSERT INTO `user_emergency_details` VALUES ('2', '3', '', '', '', '', '');
INSERT INTO `user_emergency_details` VALUES ('4', '8', '', '', '', '', '');

-- ----------------------------
-- Table structure for user_employment_history
-- ----------------------------
CREATE TABLE `user_employment_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(255) NOT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `joined_date` varchar(255) DEFAULT NULL,
  `joined_dateto` varchar(255) DEFAULT NULL,
  `specialization` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `position_level` varchar(255) DEFAULT NULL,
  `jobscope_description` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_employment_history
-- ----------------------------
INSERT INTO `user_employment_history` VALUES ('1', '2', '', '', '1970-01-01', '1970-01-01', '', '', '', '', '', '');
INSERT INTO `user_employment_history` VALUES ('2', '3', '', '', '1970-01-01', '1970-01-01', '', '', '', '', '', '');
INSERT INTO `user_employment_history` VALUES ('4', '8', '', '', '', '', '', '', null, '', '', '');

-- ----------------------------
-- Table structure for user_finance
-- ----------------------------
CREATE TABLE `user_finance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `bank` varchar(255) DEFAULT NULL,
  `bank_acc_no` varchar(255) DEFAULT NULL,
  `epf_no` varchar(255) DEFAULT NULL,
  `payslip_by` varchar(255) DEFAULT NULL,
  `basic_salary` varchar(255) DEFAULT NULL,
  `epf_contribution` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_finance
-- ----------------------------
INSERT INTO `user_finance` VALUES ('1', '2', '', '', '', '', '', '0');
INSERT INTO `user_finance` VALUES ('2', '3', '', '', '', '', '', '0');
INSERT INTO `user_finance` VALUES ('3', '4', '', '', '', '', '', '');
INSERT INTO `user_finance` VALUES ('4', '5', '', '', '', '', '', '');
INSERT INTO `user_finance` VALUES ('5', '6', '', '', '', '', '', '');
INSERT INTO `user_finance` VALUES ('6', '7', '', '', '', '', '', '');
INSERT INTO `user_finance` VALUES ('7', '8', '', '', '', '', '', '');

-- ----------------------------
-- Table structure for user_job_details
-- ----------------------------
CREATE TABLE `user_job_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `branch` varchar(255) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `group_emp` varchar(1000) DEFAULT NULL,
  `date_of_joining` varchar(255) DEFAULT NULL,
  `allow_leave_date` varchar(255) DEFAULT NULL,
  `date_left` varchar(255) DEFAULT NULL,
  `employee_type` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `skype_contact` varchar(255) DEFAULT NULL,
  `amount` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_job_details
-- ----------------------------
INSERT INTO `user_job_details` VALUES ('1', '2', '', '', '', '', '', '2022-01-01', '1970-01-01', '1970-01-01', '', 'evelyn.regasgroup@gmail.com', '', null);
INSERT INTO `user_job_details` VALUES ('2', '3', '', 'KUCHING', '', '', '', '1992-06-27', '1992-06-27', '1970-01-01', '', 'regashr2@gmail.com', '', null);
INSERT INTO `user_job_details` VALUES ('3', '4', 'LinxSystem Testing Sdn Bhd', 'KUCHING', '', '', null, '2010-07-20', '2010-07-20', '1970-01-01', '', 'gamma.auto2@gmail.com', null, null);
INSERT INTO `user_job_details` VALUES ('7', '8', 'LinxSystem Testing Sdn Bhd', '', '', '', null, '2023-09-15', '2023-09-15', '1970-01-01', '', 'raydev0012@gmail.com', null, null);

-- ----------------------------
-- Table structure for user_leave
-- ----------------------------
CREATE TABLE `user_leave` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `leave_year` varchar(100) NOT NULL DEFAULT '',
  `annual_le` varchar(255) DEFAULT '0',
  `sick_le` varchar(255) DEFAULT '0',
  `annual_taken` varchar(255) DEFAULT '0',
  `sick_taken` varchar(255) DEFAULT '0',
  `maternity_le` varchar(255) DEFAULT '0',
  `maternity_taken` varchar(255) DEFAULT '0',
  `paternity_le` varchar(255) DEFAULT '0',
  `paternity_taken` varchar(255) DEFAULT '0',
  `hospitalization_le` varchar(255) DEFAULT '0',
  `hospitalization_taken` varchar(255) DEFAULT '0',
  `carry_forward_le` varchar(255) DEFAULT '0',
  `carry_forward_taken` varchar(255) DEFAULT '0',
  `unpaid_taken` varchar(255) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_leave
-- ----------------------------
INSERT INTO `user_leave` VALUES ('1', '2', '2017', '18', '14', '0', '', '0', '', '0', '', '60', '', '0', '', '');
INSERT INTO `user_leave` VALUES ('2', '3', '2017', '14', '14', '0', '', '60', '', '3', '', '60', '', '', '', '0');
INSERT INTO `user_leave` VALUES ('4', '3', '2018', '14', '14', '10', '', '0', '', '0', '', '60', '', '0', '', '0');
INSERT INTO `user_leave` VALUES ('3', '2', '2018', '18', '14', '14', '', '0', '', '0', '', '60', '', '0', '', '0');
INSERT INTO `user_leave` VALUES ('5', '3', '2022', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `user_leave` VALUES ('6', '2', '2022', '20', '22', '0', '0', '0', '0', '0', '0', '0', '0', '3', '0', '0');
INSERT INTO `user_leave` VALUES ('7', '4', '2022', '14', '14', '0', '0', '0', '0', '0', '0', '0', '0', '3', '0', '0');
INSERT INTO `user_leave` VALUES ('9', '8', '2023', '14', '14', '0', '0', '0', '0', '0', '0', '60', '0', '0', '0', '0');

-- ----------------------------
-- Table structure for user_picture
-- ----------------------------
CREATE TABLE `user_picture` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `profile_picture` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of user_picture
-- ----------------------------
INSERT INTO `user_picture` VALUES ('1', '2', '');
INSERT INTO `user_picture` VALUES ('2', '3', '');
INSERT INTO `user_picture` VALUES ('3', '4', '');
INSERT INTO `user_picture` VALUES ('7', '8', '');

-- ----------------------------
-- Table structure for working_days
-- ----------------------------
CREATE TABLE `working_days` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_id` int(11) DEFAULT NULL,
  `branch_id` int(255) DEFAULT NULL,
  `workday_id` int(11) DEFAULT NULL,
  `day_name` varchar(15) DEFAULT NULL,
  `work_from` varchar(15) DEFAULT NULL,
  `work_to` varchar(15) DEFAULT NULL,
  `lunch_from` varchar(15) DEFAULT NULL,
  `lunch_to` varchar(15) DEFAULT NULL,
  `day_type` varchar(15) DEFAULT NULL,
  `date_update` varchar(255) DEFAULT NULL,
  `time_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=128 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of working_days
-- ----------------------------
INSERT INTO `working_days` VALUES ('58', '1', '2', '1', 'MONDAY', '08:00', '17:00', '12:00', '13:00', 'FULL', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('59', '1', '2', '2', 'TUESDAY', '08:00', '17:00', '12:00', '13:00', 'FULL', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('60', '1', '2', '3', 'WEDNESDAY', '08:00', '17:00', '', '', 'FULL', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('61', '1', '2', '4', 'THURSDAY', '08:00', '17:00', '12:00', '13:00', 'FULL', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('62', '1', '2', '5', 'FRIDAY', '08:00', '17:00', '12:00', '13:00', 'FULL', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('63', '1', '2', '6', 'SATURDAY', '', '', '', '', 'OFF', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('64', '1', '2', '7', 'SUNDAY', '', '', '', '', 'OFF', '2018-01-10', '10:07 AM');
INSERT INTO `working_days` VALUES ('119', '1', '5', '6', 'SATURDAY', '08:30', '17:30', '12:00', '13:00', 'OFF', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('118', '1', '5', '5', 'FRIDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('117', '1', '5', '4', 'THURSDAY', '08:30', '17:30', '12:00', '13:00', 'HALF', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('116', '1', '5', '3', 'WEDNESDAY', '08:30', '17:30', '12:00', '13:00', 'HALF', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('115', '1', '5', '2', 'TUESDAY', '08:30', '17:30', '12:00', '13:00', 'HALF', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('114', '1', '5', '1', 'MONDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('120', '1', '5', '7', 'SUNDAY', '08:30', '17:30', '12:00', '13:00', 'OFF', '2018-07-31', '13:53 PM');
INSERT INTO `working_days` VALUES ('121', '1', '1', '1', 'MONDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('122', '1', '1', '2', 'TUESDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('123', '1', '1', '3', 'WEDNESDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('124', '1', '1', '4', 'THURSDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('125', '1', '1', '5', 'FRIDAY', '08:30', '17:30', '12:00', '13:00', 'FULL', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('126', '1', '1', '6', 'SATURDAY', '08:30', '17:30', '12:00', '13:00', 'OFF', '2018-01-10', '10:21 AM');
INSERT INTO `working_days` VALUES ('127', '1', '1', '7', 'SUNDAY', '08:30', '17:30', '12:00', '13:00', 'OFF', '2018-01-10', '10:21 AM');
