--
-- Host: localhost    Database: i6802603_teba
-- ------------------------------------------------------


--
-- Table structure for table `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `action` varchar(255) NOT NULL,
  `model` varchar(255) DEFAULT NULL,
  `model_id` bigint(20) unsigned DEFAULT NULL,
  `details` text DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `banks`
--

CREATE TABLE `banks` (
  `bank_id` int(11) NOT NULL AUTO_INCREMENT,
  `bank_name` varchar(255) NOT NULL,
  `account_number` varchar(250) NOT NULL,
  `status` varchar(1) NOT NULL DEFAULT 'N',
  `prnt` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`bank_id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `buildings`
--

CREATE TABLE `buildings` (
  `bldg_id` int(11) NOT NULL AUTO_INCREMENT,
  `bldg_no` int(11) NOT NULL,
  `prj_id` int(11) NOT NULL,
  `areas` text NOT NULL,
  `flats_count` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  PRIMARY KEY (`bldg_id`),
  KEY `status` (`status`),
  KEY `Buildings_fk0` (`prj_id`),
  CONSTRAINT `Buildings_fk0` FOREIGN KEY (`prj_id`) REFERENCES `projects` (`prj_id`),
  CONSTRAINT `status` FOREIGN KEY (`status`) REFERENCES `status` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `cities`
--

CREATE TABLE `cities` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=90 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `clients_files`
--

CREATE TABLE `clients_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_ext` varchar(255) NOT NULL,
  `file_size` float NOT NULL,
  `folder` varchar(255) NOT NULL,
  `file_url` varchar(255) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `consultants`
--

CREATE TABLE `consultants` (
  `cons_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) DEFAULT NULL,
  `nat_id` varchar(30) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `mobile` varchar(13) DEFAULT NULL,
  `com_reg_num` int(11) NOT NULL DEFAULT 0,
  `com_reg_date` timestamp NULL DEFAULT NULL,
  `tax_card` int(11) NOT NULL DEFAULT 0,
  `reg_by` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `office_name` varchar(250) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`cons_id`),
  UNIQUE KEY `nat_id` (`nat_id`),
  KEY `Consultants_fk0` (`reg_by`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `consultants_files`
--

CREATE TABLE `consultants_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `cons_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_ext` varchar(255) NOT NULL,
  `file_size` float NOT NULL,
  `folder` varchar(255) NOT NULL,
  `file_url` varchar(255) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `contractors_files`
--

CREATE TABLE `contractors_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `cont_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_ext` varchar(255) NOT NULL,
  `file_size` float NOT NULL,
  `folder` varchar(255) NOT NULL,
  `file_url` varchar(255) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `core_settings`
--

CREATE TABLE `core_settings` (
  `slug` varchar(30) NOT NULL,
  `default` text NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY (`slug`),
  UNIQUE KEY `unique - slug` (`slug`),
  KEY `index - slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Stores settings for the multi-site interface';

--
-- Table structure for table `core_sites`
--

CREATE TABLE `core_sites` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `ref` varchar(20) NOT NULL,
  `domain` varchar(100) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_on` int(11) NOT NULL DEFAULT 0,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique ref` (`ref`),
  UNIQUE KEY `Unique domain` (`domain`),
  KEY `ref` (`ref`),
  KEY `domain` (`domain`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `core_users`
--

CREATE TABLE `core_users` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(60) NOT NULL DEFAULT '',
  `password` varchar(100) NOT NULL DEFAULT '',
  `salt` varchar(6) NOT NULL DEFAULT '',
  `group_id` int(11) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  `activation_code` varchar(40) DEFAULT NULL,
  `created_on` int(11) NOT NULL,
  `last_login` int(11) NOT NULL,
  `username` varchar(20) DEFAULT NULL,
  `forgotten_password_code` varchar(40) DEFAULT NULL,
  `remember_code` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Super User Information';

--
-- Table structure for table `default_accounts`
--

CREATE TABLE `default_accounts` (
  `acc_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `crdate` varchar(60) DEFAULT NULL,
  `receipt_id` int(11) NOT NULL DEFAULT 0,
  `amount_from` int(11) NOT NULL DEFAULT 0,
  `trans_date` varchar(50) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `trans_by` int(11) NOT NULL DEFAULT 0,
  `trans_type` varchar(20) NOT NULL DEFAULT 'move',
  PRIMARY KEY (`acc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3024 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_act`
--

CREATE TABLE `default_act` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(9) NOT NULL,
  `folder_path` varchar(250) NOT NULL,
  `title` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_admins`
--

CREATE TABLE `default_admins` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(100) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `reset_password` int(11) NOT NULL DEFAULT 0,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admins_email` (`email`),
  KEY `emp_id` (`emp_id`)
) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `default_advance`
--

CREATE TABLE `default_advance` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `extra` int(11) NOT NULL DEFAULT 0,
  `incentive` int(11) NOT NULL DEFAULT 0,
  `adjustments` int(11) NOT NULL DEFAULT 0,
  `const_insurance` int(11) NOT NULL DEFAULT 0,
  `var_insurance` int(11) NOT NULL DEFAULT 0,
  `penalty` int(11) NOT NULL DEFAULT 0,
  `absence` int(11) NOT NULL DEFAULT 0,
  `lateness` int(11) NOT NULL DEFAULT 0,
  `phone` int(11) NOT NULL DEFAULT 0,
  `fellowship_box` int(11) NOT NULL DEFAULT 0,
  `med_insurance` int(11) NOT NULL DEFAULT 0,
  `loans` int(11) NOT NULL DEFAULT 0,
  `transp` int(11) NOT NULL DEFAULT 0,
  `other_deductions` int(11) NOT NULL DEFAULT 0,
  `month` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `reg_by` int(11) DEFAULT NULL,
  `meal` float NOT NULL DEFAULT 0,
  `taswia` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=430 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_answer`
--

CREATE TABLE `default_answer` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `qid` int(11) NOT NULL,
  `answer` varchar(50) NOT NULL,
  `crdate` varchar(50) NOT NULL,
  `creator` int(11) NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_blog`
--

CREATE TABLE `default_blog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL,
  `updated` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `ordering_count` int(11) DEFAULT NULL,
  `intro` longtext DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  `slug` varchar(200) NOT NULL,
  `category_id` int(11) NOT NULL,
  `body` text NOT NULL,
  `parsed` text NOT NULL,
  `keywords` varchar(32) NOT NULL DEFAULT '',
  `author_id` int(11) NOT NULL DEFAULT 0,
  `created_on` int(11) NOT NULL,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  `comments_enabled` enum('no','1 day','1 week','2 weeks','1 month','3 months','always') NOT NULL DEFAULT '3 months',
  `status` enum('draft','live') NOT NULL DEFAULT 'draft',
  `type` set('html','markdown','wysiwyg-advanced','wysiwyg-simple') NOT NULL,
  `preview_hash` char(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_blog_categories`
--

CREATE TABLE `default_blog_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(100) NOT NULL,
  `title` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_slug` (`slug`),
  UNIQUE KEY `unique_title` (`title`),
  KEY `slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_bonus`
--

CREATE TABLE `default_bonus` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `amount` float NOT NULL,
  `type` varchar(250) NOT NULL,
  `year` int(11) NOT NULL,
  `crdate` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_cancel_res`
--

CREATE TABLE `default_cancel_res` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(10) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `resv_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `resv_by` int(11) NOT NULL,
  `payment_type` bigint(20) unsigned NOT NULL,
  `tot_inst_years` int(11) NOT NULL DEFAULT 0,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` int(11) NOT NULL DEFAULT 0,
  `alt_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`resv_id`),
  UNIQUE KEY `unique_resv` (`cl_id`,`flt_id`) USING BTREE,
  KEY `reservations_fk0` (`cl_id`),
  KEY `reservations_fk1` (`flt_id`),
  KEY `reservations_fk2` (`resv_by`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_chart`
--

CREATE TABLE `default_chart` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acc_no` int(11) NOT NULL,
  `acc_name` varchar(70) DEFAULT NULL,
  `parent` int(11) NOT NULL,
  `lvl` int(11) NOT NULL,
  `rpt` int(11) NOT NULL DEFAULT 1,
  `cr_db` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_cheques`
--

CREATE TABLE `default_cheques` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bank` varchar(50) DEFAULT NULL,
  `bank_acc` varchar(100) DEFAULT NULL,
  `amount` varchar(50) DEFAULT NULL,
  `member_no` int(11) NOT NULL,
  `name` varchar(250) DEFAULT NULL,
  `crdate` varchar(50) DEFAULT NULL,
  `prn_by` varchar(50) DEFAULT NULL,
  `prn_date` varchar(250) DEFAULT NULL,
  `mac` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_ci_sessions`
--

CREATE TABLE `default_ci_sessions` (
  `session_id` varchar(40) NOT NULL DEFAULT '0',
  `ip_address` varchar(45) NOT NULL DEFAULT '0',
  `user_agent` varchar(120) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL DEFAULT 0,
  `user_data` text DEFAULT NULL,
  PRIMARY KEY (`session_id`),
  KEY `last_activity_idx` (`last_activity`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_clients`
--

CREATE TABLE `default_clients` (
  `cl_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) DEFAULT NULL,
  `nat_id` varchar(14) DEFAULT NULL,
  `milit_card_id` varchar(64) DEFAULT '0',
  `airforce_id` int(11) NOT NULL DEFAULT 0,
  `job` varchar(250) DEFAULT NULL,
  `job_title` varchar(250) DEFAULT NULL,
  `job_place` varchar(250) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `area` varchar(250) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `mobile` varchar(11) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `per_email` varchar(255) DEFAULT NULL,
  `teba_email` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT '0',
  `account_no` varchar(255) DEFAULT '0',
  `file_no` int(11) DEFAULT 0,
  `old_member_no` int(11) DEFAULT 0,
  `member_no` int(11) DEFAULT 0,
  `relation` int(11) DEFAULT NULL,
  `related_to` int(11) DEFAULT NULL,
  `member_start_date` varchar(90) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `member_type` varchar(30) DEFAULT NULL,
  `move_status` varchar(50) DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `warn` int(11) NOT NULL DEFAULT 0,
  `rev` varchar(1) NOT NULL DEFAULT 'N',
  `onoff` varchar(3) DEFAULT NULL,
  `action` varchar(4) NOT NULL DEFAULT 'off',
  PRIMARY KEY (`cl_id`),
  UNIQUE KEY `arabic_name` (`arabic_name`),
  KEY `member_no` (`old_member_no`),
  KEY `nat_id` (`nat_id`),
  KEY `address` (`address`),
  KEY `state` (`state`),
  KEY `job_title` (`job_title`),
  KEY `job_place` (`job_place`),
  KEY `nationality` (`nationality`),
  KEY `member_type` (`member_type`),
  KEY `flag` (`flag`),
  KEY `file_no` (`file_no`),
  KEY `job` (`job`),
  KEY `token` (`token`),
  KEY `move_status` (`move_status`),
  KEY `member_start_date` (`member_start_date`),
  KEY `gender` (`gender`),
  KEY `per_email` (`per_email`)
) ENGINE=InnoDB AUTO_INCREMENT=18338 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_clients_backup`
--

CREATE TABLE `default_clients_backup` (
  `cl_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) DEFAULT NULL,
  `nat_id` varchar(14) DEFAULT NULL,
  `milit_card_id` varchar(64) DEFAULT '0',
  `job` varchar(250) DEFAULT NULL,
  `job_title` varchar(250) DEFAULT NULL,
  `job_place` varchar(250) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) NOT NULL,
  `token` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `area` varchar(250) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `mobile` varchar(11) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `per_email` varchar(255) DEFAULT NULL,
  `teba_email` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT '0',
  `account_no` varchar(255) DEFAULT '0',
  `file_no` int(11) DEFAULT 0,
  `old_member_no` varchar(64) DEFAULT '0',
  `member_no` int(11) DEFAULT 0,
  `relation` int(11) DEFAULT NULL,
  `related_to` int(11) DEFAULT NULL,
  `member_start_date` varchar(90) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `member_type` varchar(30) DEFAULT NULL,
  `move_status` varchar(50) DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `upd_by` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`cl_id`),
  UNIQUE KEY `arabic_name` (`arabic_name`),
  KEY `member_no` (`old_member_no`),
  KEY `nat_id` (`nat_id`),
  KEY `address` (`address`),
  KEY `state` (`state`),
  KEY `job_title` (`job_title`),
  KEY `job_place` (`job_place`),
  KEY `nationality` (`nationality`),
  KEY `member_type` (`member_type`),
  KEY `flag` (`flag`),
  KEY `file_no` (`file_no`),
  KEY `job` (`job`),
  KEY `token` (`token`),
  KEY `move_status` (`move_status`),
  KEY `member_start_date` (`member_start_date`),
  KEY `gender` (`gender`),
  KEY `per_email` (`per_email`)
) ENGINE=InnoDB AUTO_INCREMENT=105476 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_clients_check`
--

CREATE TABLE `default_clients_check` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `old_member_no` int(11) DEFAULT NULL,
  `chk_num` varchar(255) DEFAULT NULL,
  `chk_date` date NOT NULL,
  `chk_amount` float NOT NULL DEFAULT 0,
  `prj_id` int(11) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `creator` varchar(255) DEFAULT NULL,
  `crdate` varchar(255) DEFAULT NULL,
  `del_by` varchar(255) DEFAULT NULL,
  `del_date` varchar(255) DEFAULT NULL,
  `paid` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3070 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_clients_live`
--

CREATE TABLE `default_clients_live` (
  `cl_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) NOT NULL,
  `arabic_name` varchar(255) NOT NULL,
  `nat_id` varchar(14) NOT NULL,
  `milit_card_id` varchar(64) DEFAULT NULL,
  `nationality` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `birth_date` varchar(20) DEFAULT NULL,
  `city` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) NOT NULL,
  `mobile` varchar(11) NOT NULL,
  `gender` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `member_no` varchar(64) DEFAULT NULL,
  `member_start_date` varchar(50) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `member_type` varchar(30) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `email` varchar(550) DEFAULT NULL,
  PRIMARY KEY (`cl_id`)
) ENGINE=InnoDB AUTO_INCREMENT=846 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_clients_tmp`
--

CREATE TABLE `default_clients_tmp` (
  `cl_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) DEFAULT NULL,
  `nat_id` varchar(14) DEFAULT NULL,
  `milit_card_id` varchar(64) DEFAULT '0',
  `airforce_id` int(11) NOT NULL DEFAULT 0,
  `job` varchar(250) DEFAULT NULL,
  `job_title` varchar(250) DEFAULT NULL,
  `job_place` varchar(250) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `area` varchar(250) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `mobile` varchar(11) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `per_email` varchar(255) DEFAULT NULL,
  `teba_email` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT '0',
  `account_no` varchar(255) DEFAULT '0',
  `file_no` int(11) DEFAULT 0,
  `old_member_no` varchar(64) DEFAULT '0',
  `member_no` int(11) DEFAULT 0,
  `relation` int(11) DEFAULT NULL,
  `related_to` int(11) DEFAULT NULL,
  `member_start_date` varchar(90) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `member_type` varchar(30) DEFAULT NULL,
  `move_status` varchar(50) DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` date DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `warn` int(11) NOT NULL DEFAULT 0,
  `rev` varchar(1) NOT NULL DEFAULT 'N',
  `onoff` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`cl_id`),
  UNIQUE KEY `arabic_name` (`arabic_name`),
  KEY `member_no` (`old_member_no`),
  KEY `nat_id` (`nat_id`),
  KEY `address` (`address`),
  KEY `state` (`state`),
  KEY `job_title` (`job_title`),
  KEY `job_place` (`job_place`),
  KEY `nationality` (`nationality`),
  KEY `member_type` (`member_type`),
  KEY `flag` (`flag`),
  KEY `file_no` (`file_no`),
  KEY `job` (`job`),
  KEY `token` (`token`),
  KEY `move_status` (`move_status`),
  KEY `member_start_date` (`member_start_date`),
  KEY `gender` (`gender`),
  KEY `per_email` (`per_email`)
) ENGINE=InnoDB AUTO_INCREMENT=17483 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_comment_blacklists`
--

CREATE TABLE `default_comment_blacklists` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `website` varchar(255) NOT NULL DEFAULT '',
  `email` varchar(150) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_comments`
--

CREATE TABLE `default_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_active` int(11) NOT NULL DEFAULT 0,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `user_name` varchar(40) NOT NULL DEFAULT '',
  `user_email` varchar(40) NOT NULL DEFAULT '',
  `user_website` varchar(255) NOT NULL,
  `comment` text NOT NULL,
  `parsed` text NOT NULL,
  `module` varchar(40) NOT NULL,
  `entry_id` varchar(255) NOT NULL DEFAULT '0',
  `entry_title` char(255) NOT NULL,
  `entry_key` varchar(100) NOT NULL,
  `entry_plural` varchar(100) NOT NULL,
  `uri` varchar(255) DEFAULT NULL,
  `cp_uri` varchar(255) DEFAULT NULL,
  `created_on` int(11) NOT NULL DEFAULT 0,
  `ip_address` varchar(45) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_company`
--

CREATE TABLE `default_company` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cname` varchar(250) DEFAULT NULL,
  `extra_disc` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_cons_rec`
--

CREATE TABLE `default_cons_rec` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cons_id` int(11) NOT NULL,
  `tot_amount` int(11) NOT NULL DEFAULT 0,
  `tash` int(11) NOT NULL DEFAULT 0,
  `reg_tax` int(11) NOT NULL DEFAULT 0,
  `extra_tax` int(11) NOT NULL DEFAULT 0,
  `eng_tax` int(11) NOT NULL DEFAULT 0,
  `tatb_tax` int(11) NOT NULL DEFAULT 0,
  `deal` int(11) DEFAULT 0,
  `indust_tax` int(11) NOT NULL DEFAULT 0,
  `insurance` int(11) NOT NULL DEFAULT 0,
  `work_garn` int(11) NOT NULL DEFAULT 0,
  `type` varchar(50) DEFAULT NULL,
  `rec_id` int(11) NOT NULL DEFAULT 0,
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `qema_mod` varchar(1) NOT NULL DEFAULT 'N',
  `rec_paid` varchar(1) NOT NULL DEFAULT 'N',
  `work_amount` int(11) NOT NULL DEFAULT 0,
  `base_amount` int(11) NOT NULL DEFAULT 0,
  `final_amount` int(11) NOT NULL DEFAULT 0,
  `rec_date` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_contact_log`
--

CREATE TABLE `default_contact_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL DEFAULT '',
  `subject` varchar(255) NOT NULL DEFAULT '',
  `message` text NOT NULL,
  `sender_agent` varchar(255) NOT NULL DEFAULT '',
  `sender_ip` varchar(45) NOT NULL DEFAULT '',
  `sender_os` varchar(255) NOT NULL DEFAULT '',
  `sent_at` int(11) NOT NULL DEFAULT 0,
  `attachments` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_contractors`
--

CREATE TABLE `default_contractors` (
  `cont_id` int(11) NOT NULL AUTO_INCREMENT,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `nat_id` varchar(30) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `mobile` varchar(13) DEFAULT NULL,
  `com_reg_num` int(11) DEFAULT NULL,
  `com_reg_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `tax_card` int(11) DEFAULT NULL,
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `comp_name` varchar(250) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`cont_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_data_field_assignments`
--

CREATE TABLE `default_data_field_assignments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sort_order` int(11) NOT NULL,
  `stream_id` int(11) NOT NULL,
  `field_id` int(11) NOT NULL,
  `is_required` enum('yes','no') NOT NULL DEFAULT 'no',
  `is_unique` enum('yes','no') NOT NULL DEFAULT 'no',
  `instructions` text DEFAULT NULL,
  `field_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_data_fields`
--

CREATE TABLE `default_data_fields` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `field_name` varchar(60) NOT NULL,
  `field_slug` varchar(60) NOT NULL,
  `field_namespace` varchar(60) DEFAULT NULL,
  `field_type` varchar(50) NOT NULL,
  `field_data` blob DEFAULT NULL,
  `view_options` blob DEFAULT NULL,
  `is_locked` enum('yes','no') NOT NULL DEFAULT 'no',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_data_streams`
--

CREATE TABLE `default_data_streams` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stream_name` varchar(60) NOT NULL,
  `stream_slug` varchar(60) NOT NULL,
  `stream_namespace` varchar(60) DEFAULT NULL,
  `stream_prefix` varchar(60) DEFAULT NULL,
  `about` varchar(255) DEFAULT NULL,
  `view_options` blob NOT NULL,
  `title_column` varchar(255) DEFAULT NULL,
  `sorting` enum('title','custom') NOT NULL DEFAULT 'title',
  `permissions` text DEFAULT NULL,
  `is_hidden` enum('yes','no') NOT NULL DEFAULT 'no',
  `menu_path` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_def_page_fields`
--

CREATE TABLE `default_def_page_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL,
  `updated` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `ordering_count` int(11) DEFAULT NULL,
  `body` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_del_res`
--

CREATE TABLE `default_del_res` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(8) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) DEFAULT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` double DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `flt_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`resv_id`),
  KEY `flat` (`flat_num`),
  KEY `bldg` (`bldg_id`),
  KEY `resv` (`resv_date`),
  KEY `client` (`cl_id`),
  KEY `prj_id` (`prj_id`),
  KEY `flt_id` (`flt_id`),
  KEY `floor` (`floor`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB AUTO_INCREMENT=7143 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_docs`
--

CREATE TABLE `default_docs` (
  `doc_no` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Serial',
  `id` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Emp ID',
  `url` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Doc. URL',
  `filename` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'File Name',
  PRIMARY KEY (`doc_no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_duplix`
--

CREATE TABLE `default_duplix` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `bldg` int(11) NOT NULL,
  `flat_no1` int(11) NOT NULL,
  `flat_no2` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_email_templates`
--

CREATE TABLE `default_email_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `lang` varchar(2) DEFAULT NULL,
  `is_default` int(11) NOT NULL DEFAULT 0,
  `module` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug_lang` (`slug`,`lang`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_email_warning`
--

CREATE TABLE `default_email_warning` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `warn_mail` varchar(2) NOT NULL,
  `deduct_no` int(11) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_emp_att`
--

CREATE TABLE `default_emp_att` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) DEFAULT NULL,
  `machine_id` int(11) NOT NULL DEFAULT 0,
  `day` date DEFAULT NULL,
  `enter_tm` time DEFAULT NULL,
  `exit_tm` time DEFAULT NULL,
  `day2` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2200 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_emp_att_old`
--

CREATE TABLE `default_emp_att_old` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `machine_id` int(11) NOT NULL DEFAULT 0,
  `day` varchar(12) DEFAULT NULL,
  `enter_tm` datetime DEFAULT NULL,
  `exit_tm` datetime DEFAULT NULL,
  `day2` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1949 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_employee`
--

CREATE TABLE `default_employee` (
  `emp_id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_mach_id` int(11) NOT NULL DEFAULT 0,
  `english_name` varchar(255) DEFAULT NULL,
  `arabic_name` varchar(255) NOT NULL,
  `emp_order` int(11) NOT NULL DEFAULT 0,
  `nat_id` varchar(14) DEFAULT NULL,
  `bdate` varchar(50) DEFAULT NULL,
  `ins_id` varchar(11) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `hire_date` varchar(50) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `mobile` varchar(11) NOT NULL,
  `gender` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `manager_id` varchar(11) DEFAULT NULL,
  `salary` varchar(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `job` varchar(200) DEFAULT NULL,
  `job_place` varchar(200) DEFAULT NULL,
  `wrk_hrs` int(11) NOT NULL DEFAULT 8,
  `from_hrs` int(11) NOT NULL DEFAULT 8,
  `to_hrs` int(11) NOT NULL DEFAULT 16,
  `close` varchar(1) NOT NULL DEFAULT 'N',
  `action` varchar(1) NOT NULL DEFAULT 'N',
  `fire_date` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`emp_id`)
) ENGINE=InnoDB AUTO_INCREMENT=376 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_file_folders`
--

CREATE TABLE `default_file_folders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT 0,
  `slug` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `location` varchar(20) NOT NULL DEFAULT 'local',
  `remote_container` varchar(100) NOT NULL DEFAULT '',
  `date_added` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT 0,
  `hidden` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_files`
--

CREATE TABLE `default_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `folder_id` varchar(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL,
  `name` varchar(500) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `extension` varchar(10) DEFAULT NULL,
  `mimetype` varchar(100) DEFAULT NULL,
  `keywords` char(32) DEFAULT NULL,
  `width` int(11) DEFAULT NULL,
  `height` int(11) DEFAULT NULL,
  `filesize` int(11) DEFAULT NULL,
  `alt_attribute` varchar(255) DEFAULT NULL,
  `download_count` int(11) DEFAULT NULL,
  `date_added` varchar(250) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `delpath` varchar(250) DEFAULT NULL,
  `up_by` varchar(250) DEFAULT NULL,
  `req` varchar(9) NOT NULL DEFAULT 'N',
  `page_num` int(11) NOT NULL,
  `del_date` varchar(50) DEFAULT NULL,
  `del_by` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=343 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_fin_bank_start`
--

CREATE TABLE `default_fin_bank_start` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bank_id` int(11) NOT NULL,
  `amount` varchar(20) NOT NULL,
  `period_from` varchar(50) DEFAULT NULL,
  `period_to` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_fin_banks`
--

CREATE TABLE `default_fin_banks` (
  `bank_id` int(11) NOT NULL AUTO_INCREMENT,
  `bank_name` varchar(150) DEFAULT NULL,
  PRIMARY KEY (`bank_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_fin_banks_det`
--

CREATE TABLE `default_fin_banks_det` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bank_id` int(11) NOT NULL,
  `desc` varchar(250) DEFAULT NULL,
  `amount` varchar(50) DEFAULT NULL,
  `period_from` varchar(50) DEFAULT NULL,
  `period_to` varchar(50) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_final_stat`
--

CREATE TABLE `default_final_stat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_id` int(11) NOT NULL,
  `prj_id` int(11) NOT NULL,
  `tasks_total` double NOT NULL,
  `prev_tasks` double NOT NULL,
  `cr_tasks` double NOT NULL,
  `task_insur` double NOT NULL,
  `net` double NOT NULL,
  `extra_disc` double NOT NULL DEFAULT 0,
  `net_with_qima` double NOT NULL,
  `qima` double NOT NULL,
  `net_without_qima` double NOT NULL,
  `social_insur` double NOT NULL,
  `norm_stamp` double NOT NULL,
  `extra_stamp` double NOT NULL,
  `eng_stamp` double NOT NULL,
  `tatb_stamp` double NOT NULL,
  `total_stamp` double NOT NULL,
  `final_net` double NOT NULL,
  `paied` double NOT NULL,
  `paied_type` varchar(250) DEFAULT NULL,
  `chk_num` int(11) NOT NULL DEFAULT 0,
  `crdate` int(11) NOT NULL,
  `task_type` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_garden`
--

CREATE TABLE `default_garden` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `flat_num` varchar(11) NOT NULL,
  `area` varchar(11) NOT NULL,
  `aprox_total` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `bldg_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=568 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_groups`
--

CREATE TABLE `default_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `description` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_hist_salary`
--

CREATE TABLE `default_hist_salary` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `job` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `job_place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `base` int(11) NOT NULL DEFAULT 0,
  `ins` int(11) DEFAULT 0,
  `transp` int(11) NOT NULL DEFAULT 0,
  `inc` int(11) NOT NULL DEFAULT 0,
  `abs` int(11) NOT NULL DEFAULT 0,
  `loan` int(11) NOT NULL DEFAULT 0,
  `total` int(11) DEFAULT 0,
  `mon` int(11) NOT NULL DEFAULT 0,
  `yr` int(11) NOT NULL DEFAULT 0,
  `emp_id` int(11) DEFAULT NULL,
  `extra` int(11) NOT NULL DEFAULT 0,
  `adj` int(11) NOT NULL DEFAULT 0,
  `meal` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11789 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_hr_audit`
--

CREATE TABLE `default_hr_audit` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) DEFAULT NULL,
  `type` varchar(50) NOT NULL,
  `reference_id` varchar(50) DEFAULT NULL,
  `snapshot` text DEFAULT NULL,
  `reg_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `default_im_ex_files`
--

CREATE TABLE `default_im_ex_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `folder_name` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `name` varchar(500) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `extension` varchar(10) DEFAULT NULL,
  `date_added` varchar(250) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `delpath` varchar(250) DEFAULT NULL,
  `up_by` varchar(250) DEFAULT NULL,
  `del_date` varchar(50) DEFAULT NULL,
  `del_by` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_in_out`
--

CREATE TABLE `default_in_out` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item` varchar(250) NOT NULL,
  `type` varchar(10) NOT NULL,
  `value` int(11) NOT NULL,
  `crdate` varchar(50) NOT NULL,
  `yr` int(11) NOT NULL,
  `acc` varchar(250) DEFAULT NULL,
  `chk_no` varchar(250) DEFAULT NULL,
  `desc_date` varchar(250) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_info_warning`
--

CREATE TABLE `default_info_warning` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `member_no` int(11) NOT NULL DEFAULT 0,
  `bldg` int(11) NOT NULL DEFAULT 0,
  `flat_num` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=569 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_jobs`
--

CREATE TABLE `default_jobs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(250) DEFAULT NULL,
  `desc` varchar(1500) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_keywords`
--

CREATE TABLE `default_keywords` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_keywords_applied`
--

CREATE TABLE `default_keywords_applied` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hash` char(32) NOT NULL DEFAULT '',
  `keyword_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_log`
--

CREATE TABLE `default_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `qry_type` varchar(20) DEFAULT NULL,
  `qry` varchar(1500) DEFAULT NULL,
  `crdate` varchar(20) DEFAULT NULL,
  `ex_time` varchar(20) DEFAULT NULL,
  `run_by` varchar(20) DEFAULT NULL,
  `synced` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=842042 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_log_file`
--

CREATE TABLE `default_log_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `creator` varchar(50) NOT NULL,
  `crdate` varchar(50) NOT NULL,
  `full_data` longtext NOT NULL,
  `type` varchar(50) NOT NULL,
  `tbl` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=190171 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_mem_comments`
--

CREATE TABLE `default_mem_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mem_no` int(11) NOT NULL,
  `cl_id` int(11) NOT NULL DEFAULT 0,
  `comment` text NOT NULL,
  `crdate` timestamp NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 0,
  `user` varchar(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2264 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_migrations`
--

CREATE TABLE `default_migrations` (
  `version` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_modules`
--

CREATE TABLE `default_modules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `slug` varchar(50) NOT NULL,
  `version` varchar(20) NOT NULL,
  `type` varchar(20) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `skip_xss` tinyint(1) NOT NULL,
  `is_frontend` tinyint(1) NOT NULL,
  `is_backend` tinyint(1) NOT NULL,
  `menu` varchar(20) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `installed` tinyint(1) NOT NULL,
  `is_core` tinyint(1) NOT NULL,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `enabled` (`enabled`)
) ENGINE=MyISAM AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_move_requests`
--

CREATE TABLE `default_move_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mem_no` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `project` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `area` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `bldg` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `flat` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `file` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `creation_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT '1',
  `delete_date` timestamp NULL DEFAULT NULL,
  `deleted_by` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_navigation_groups`
--

CREATE TABLE `default_navigation_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `abbrev` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `abbrev` (`abbrev`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_navigation_links`
--

CREATE TABLE `default_navigation_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL DEFAULT '',
  `parent` int(11) DEFAULT NULL,
  `link_type` varchar(20) NOT NULL DEFAULT 'uri',
  `page_id` int(11) DEFAULT NULL,
  `module_name` varchar(50) NOT NULL DEFAULT '',
  `url` varchar(255) NOT NULL DEFAULT '',
  `uri` varchar(255) NOT NULL DEFAULT '',
  `navigation_group_id` int(11) NOT NULL DEFAULT 0,
  `position` int(11) NOT NULL DEFAULT 0,
  `target` varchar(10) DEFAULT NULL,
  `restricted_to` varchar(255) DEFAULT NULL,
  `class` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `navigation_group_id` (`navigation_group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_page`
--

CREATE TABLE `default_page` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `class` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(255) NOT NULL DEFAULT '',
  `uri` text DEFAULT NULL,
  `parent_id` int(11) NOT NULL DEFAULT 0,
  `type_id` varchar(255) NOT NULL,
  `entry_id` varchar(255) DEFAULT NULL,
  `css` text DEFAULT NULL,
  `js` text DEFAULT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_keywords` char(32) DEFAULT NULL,
  `meta_robots_no_index` tinyint(1) DEFAULT NULL,
  `meta_robots_no_follow` tinyint(1) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `rss_enabled` int(11) NOT NULL DEFAULT 0,
  `comments_enabled` int(11) NOT NULL DEFAULT 0,
  `status` enum('draft','live') NOT NULL DEFAULT 'draft',
  `created_on` int(11) NOT NULL DEFAULT 0,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  `restricted_to` varchar(255) DEFAULT NULL,
  `is_home` int(11) NOT NULL DEFAULT 0,
  `strict_uri` tinyint(1) NOT NULL DEFAULT 1,
  `order` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `slug` (`slug`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_page_type`
--

CREATE TABLE `default_page_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(60) NOT NULL,
  `description` text DEFAULT NULL,
  `stream_id` int(11) NOT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_keywords` char(32) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `body` text NOT NULL,
  `css` text DEFAULT NULL,
  `js` text DEFAULT NULL,
  `theme_layout` varchar(100) NOT NULL DEFAULT 'default',
  `updated_on` int(11) NOT NULL,
  `save_as_files` char(1) NOT NULL DEFAULT 'n',
  `content_label` varchar(60) DEFAULT NULL,
  `title_label` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_page_types`
--

CREATE TABLE `default_page_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(60) NOT NULL,
  `description` text DEFAULT NULL,
  `stream_id` int(11) NOT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_keywords` char(32) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `body` text NOT NULL,
  `css` text DEFAULT NULL,
  `js` text DEFAULT NULL,
  `theme_layout` varchar(100) NOT NULL DEFAULT 'default',
  `updated_on` int(11) NOT NULL,
  `save_as_files` char(1) NOT NULL DEFAULT 'n',
  `content_label` varchar(60) DEFAULT NULL,
  `title_label` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_pages`
--

CREATE TABLE `default_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `class` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(255) NOT NULL DEFAULT '',
  `uri` text DEFAULT NULL,
  `parent_id` int(11) NOT NULL DEFAULT 0,
  `type_id` varchar(255) NOT NULL,
  `entry_id` varchar(255) DEFAULT NULL,
  `css` text DEFAULT NULL,
  `js` text DEFAULT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_keywords` char(32) DEFAULT NULL,
  `meta_robots_no_index` tinyint(1) DEFAULT NULL,
  `meta_robots_no_follow` tinyint(1) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `rss_enabled` int(11) NOT NULL DEFAULT 0,
  `comments_enabled` int(11) NOT NULL DEFAULT 0,
  `status` enum('draft','live') NOT NULL DEFAULT 'draft',
  `created_on` int(11) NOT NULL DEFAULT 0,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  `restricted_to` varchar(255) DEFAULT NULL,
  `is_home` int(11) NOT NULL DEFAULT 0,
  `strict_uri` tinyint(1) NOT NULL DEFAULT 1,
  `order` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `slug` (`slug`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_park_inst`
--

CREATE TABLE `default_park_inst` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `bldg_no` int(11) NOT NULL,
  `park_no` varchar(11) NOT NULL,
  `yr` int(11) NOT NULL,
  `mon` int(11) NOT NULL,
  `inst_amount` float NOT NULL DEFAULT 0,
  `date` date DEFAULT NULL,
  `yr_mon` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1602 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_park_resv`
--

CREATE TABLE `default_park_resv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `prj_id` varchar(255) NOT NULL,
  `bldg` varchar(255) NOT NULL,
  `park_no` varchar(255) NOT NULL,
  `crdate` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=774 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_pay_consultants`
--

CREATE TABLE `default_pay_consultants` (
  `pay_id` int(11) NOT NULL AUTO_INCREMENT,
  `cons_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `chk_num` int(11) NOT NULL DEFAULT 0,
  `chk_date` varchar(250) NOT NULL DEFAULT '0',
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`pay_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_pay_contractors`
--

CREATE TABLE `default_pay_contractors` (
  `pay_id` int(11) NOT NULL AUTO_INCREMENT,
  `cont_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `chk_num` int(11) NOT NULL DEFAULT 0,
  `chk_date` varchar(250) NOT NULL DEFAULT '0',
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`pay_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_pay_inst`
--

CREATE TABLE `default_pay_inst` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `flat_id` int(11) NOT NULL,
  `yr` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `date` varchar(50) NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_id` int(11) NOT NULL,
  `inst_amount` int(11) NOT NULL,
  `total_req` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_pay_order`
--

CREATE TABLE `default_pay_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_no` int(11) NOT NULL DEFAULT 0,
  `amount` int(11) DEFAULT 0,
  `bank` varchar(100) DEFAULT NULL,
  `type` varchar(250) DEFAULT NULL,
  `issue_date` varchar(50) DEFAULT NULL,
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `pay_until` varchar(50) NOT NULL DEFAULT '0',
  `user` varchar(5) DEFAULT NULL,
  `flag` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41825 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_pendings`
--

CREATE TABLE `default_pendings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) DEFAULT NULL,
  `cl_to` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `flt_id` int(11) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `status` varchar(1) NOT NULL DEFAULT 'N',
  `type` varchar(2) DEFAULT NULL,
  `recs` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_perm`
--

CREATE TABLE `default_perm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `add` varchar(1) NOT NULL DEFAULT 'N',
  `vw` varchar(1) DEFAULT 'N',
  `edit` varchar(1) DEFAULT 'N',
  `del` varchar(1) DEFAULT 'N',
  `prn` varchar(1) DEFAULT 'N',
  `prn_sal` varchar(1) DEFAULT 'N',
  `resv` varchar(1) NOT NULL DEFAULT 'N',
  `add_resv` varchar(1) NOT NULL DEFAULT 'N',
  `del_resv` varchar(1) NOT NULL DEFAULT 'N',
  `mov` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=441 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_permissions`
--

CREATE TABLE `default_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `module` varchar(50) NOT NULL,
  `roles` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_profiles`
--

CREATE TABLE `default_profiles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime DEFAULT NULL,
  `updated` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `ordering_count` int(11) DEFAULT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `display_name` varchar(50) NOT NULL,
  `first_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `company` varchar(100) DEFAULT NULL,
  `lang` varchar(2) NOT NULL DEFAULT 'en',
  `bio` text DEFAULT NULL,
  `dob` int(11) DEFAULT NULL,
  `gender` set('m','f','') DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `address_line1` varchar(255) DEFAULT NULL,
  `address_line2` varchar(255) DEFAULT NULL,
  `address_line3` varchar(255) DEFAULT NULL,
  `postcode` varchar(20) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `updated_on` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_pub_detail`
--

CREATE TABLE `default_pub_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pub_id` int(11) NOT NULL,
  `author` varchar(250) DEFAULT NULL,
  `journal` varchar(900) DEFAULT NULL,
  `pages` int(11) NOT NULL,
  `desc` varchar(1500) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_quest`
--

CREATE TABLE `default_quest` (
  `qid` int(11) NOT NULL AUTO_INCREMENT,
  `quest` varchar(500) NOT NULL,
  `prj_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `member_no` int(11) NOT NULL,
  `status` varchar(1) NOT NULL DEFAULT 'N',
  `crdate` varchar(50) NOT NULL,
  PRIMARY KEY (`qid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_rec_files`
--

CREATE TABLE `default_rec_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `folder_id` varchar(55) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL,
  `name` varchar(500) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `extension` varchar(10) DEFAULT NULL,
  `mimetype` varchar(100) DEFAULT NULL,
  `keywords` char(32) DEFAULT NULL,
  `width` int(11) DEFAULT NULL,
  `height` int(11) DEFAULT NULL,
  `filesize` int(11) DEFAULT NULL,
  `alt_attribute` varchar(255) DEFAULT NULL,
  `download_count` int(11) DEFAULT NULL,
  `date_added` varchar(250) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `delpath` varchar(250) DEFAULT NULL,
  `up_by` varchar(250) DEFAULT NULL,
  `req` varchar(9) NOT NULL DEFAULT 'N',
  `page_num` int(11) NOT NULL,
  `del_date` varchar(50) DEFAULT NULL,
  `del_by` varchar(50) DEFAULT NULL,
  `flag` int(11) NOT NULL DEFAULT 1,
  `moved` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=210 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_receipts`
--

CREATE TABLE `default_receipts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0',
  `bnk_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `cl_id` int(11) NOT NULL,
  `reg_by` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` varchar(50) NOT NULL,
  `rev_date` date DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` varchar(60) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `deleted_by` int(11) NOT NULL DEFAULT 0,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `trans_id` int(11) NOT NULL DEFAULT 0,
  `chk` varchar(1) NOT NULL DEFAULT 'N',
  `rev` varchar(2) NOT NULL DEFAULT 'N',
  `cnf` varchar(1) NOT NULL DEFAULT 'N',
  `chk_ids` varchar(350) DEFAULT NULL,
  `rel_date` date DEFAULT NULL,
  `locked` varchar(1) NOT NULL DEFAULT 'N',
  `penality` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `reg_by` (`reg_by`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=91477 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_receipts_backup`
--

CREATE TABLE `default_receipts_backup` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `cl_id` int(11) NOT NULL,
  `reg_by` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` varchar(50) NOT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` varchar(60) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `deleted_by` int(11) NOT NULL DEFAULT 0,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `trans_id` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `reg_by` (`reg_by`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=63053 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_receipts_bk`
--

CREATE TABLE `default_receipts_bk` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `cl_id` int(11) NOT NULL,
  `reg_by` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` varchar(50) NOT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` varchar(60) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `deleted_by` int(11) NOT NULL DEFAULT 0,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `trans_id` int(11) NOT NULL DEFAULT 0,
  `chk` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `reg_by` (`reg_by`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=41955 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_receipts_live`
--

CREATE TABLE `default_receipts_live` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `cl_id` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` varchar(20) NOT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=456 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_redirect`
--

CREATE TABLE `default_redirect` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from` varchar(250) NOT NULL,
  `to` varchar(250) NOT NULL,
  `type` int(11) NOT NULL DEFAULT 302,
  PRIMARY KEY (`id`),
  KEY `from` (`from`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_redirects`
--

CREATE TABLE `default_redirects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from` varchar(250) NOT NULL,
  `to` varchar(250) NOT NULL,
  `type` int(11) NOT NULL DEFAULT 302,
  PRIMARY KEY (`id`),
  KEY `from` (`from`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_req_member`
--

CREATE TABLE `default_req_member` (
  `cl_id` int(11) NOT NULL AUTO_INCREMENT,
  `arabic_name` varchar(255) NOT NULL,
  `english_name` varchar(255) NOT NULL,
  `nat_id` varchar(14) NOT NULL,
  `milit_card_id` varchar(20) DEFAULT NULL,
  `address` varchar(255) NOT NULL,
  `nationality` varchar(255) NOT NULL,
  `mobile` varchar(20) NOT NULL,
  `gender` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `per_email` varchar(255) NOT NULL,
  `dob` varchar(50) DEFAULT NULL,
  `cert` varchar(255) NOT NULL,
  `mar_state` varchar(255) NOT NULL,
  `job` varchar(255) NOT NULL,
  `tel_num` varchar(255) NOT NULL,
  `whats_num` varchar(255) NOT NULL,
  `reg_by` varchar(55) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`cl_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_requests`
--

CREATE TABLE `default_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `req` varchar(9) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_reservations`
--

CREATE TABLE `default_reservations` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) DEFAULT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` double DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `flt_order` varchar(11) DEFAULT NULL,
  `park` varchar(1) NOT NULL DEFAULT 'N',
  `park_count` int(11) NOT NULL DEFAULT 0,
  `garden` varchar(1) NOT NULL DEFAULT 'N',
  `garden_size` float NOT NULL DEFAULT 0,
  `roof` varchar(1) NOT NULL DEFAULT 'N',
  `roof_size` float NOT NULL DEFAULT 1,
  `sess` int(11) NOT NULL DEFAULT 2,
  `res_kind` varchar(1) NOT NULL DEFAULT '0',
  `num_days` varchar(2) NOT NULL DEFAULT '0',
  `subsess` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`resv_id`),
  KEY `flat` (`flat_num`),
  KEY `bldg` (`bldg_id`),
  KEY `resv` (`resv_date`),
  KEY `client` (`cl_id`),
  KEY `prj_id` (`prj_id`),
  KEY `flt_id` (`flt_id`),
  KEY `floor` (`floor`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB AUTO_INCREMENT=8829 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_reservations_backup`
--

CREATE TABLE `default_reservations_backup` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(10) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(8) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) NOT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` int(11) DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`resv_id`),
  KEY `flat` (`flat_num`),
  KEY `bldg` (`bldg_id`),
  KEY `resv` (`resv_date`),
  KEY `client` (`cl_id`),
  KEY `prj_id` (`prj_id`),
  KEY `flt_id` (`flt_id`),
  KEY `floor` (`floor`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB AUTO_INCREMENT=4413 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_reservations_tmp`
--

CREATE TABLE `default_reservations_tmp` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) DEFAULT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` double DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `flt_order` varchar(11) DEFAULT NULL,
  `park` varchar(1) NOT NULL DEFAULT 'N',
  `park_count` int(11) NOT NULL DEFAULT 0,
  `garden` varchar(1) NOT NULL DEFAULT 'N',
  `garden_size` float NOT NULL DEFAULT 0,
  `roof` varchar(1) NOT NULL DEFAULT 'N',
  `roof_size` float NOT NULL DEFAULT 1,
  `sess` int(11) NOT NULL DEFAULT 2,
  `res_kind` varchar(1) NOT NULL DEFAULT '0',
  `num_days` varchar(2) NOT NULL DEFAULT '0',
  `subsess` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`resv_id`),
  KEY `flat` (`flat_num`),
  KEY `bldg` (`bldg_id`),
  KEY `resv` (`resv_date`),
  KEY `client` (`cl_id`),
  KEY `prj_id` (`prj_id`),
  KEY `flt_id` (`flt_id`),
  KEY `floor` (`floor`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB AUTO_INCREMENT=2504 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_salary`
--

CREATE TABLE `default_salary` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `extra` int(11) NOT NULL DEFAULT 0,
  `incentive` int(11) NOT NULL DEFAULT 0,
  `adjustments` int(11) NOT NULL DEFAULT 0,
  `const_insurance` int(11) NOT NULL DEFAULT 0,
  `var_insurance` int(11) NOT NULL DEFAULT 0,
  `penalty` int(11) NOT NULL DEFAULT 0,
  `absence` int(11) NOT NULL DEFAULT 0,
  `lateness` int(11) NOT NULL DEFAULT 0,
  `phone` int(11) NOT NULL DEFAULT 0,
  `fellowship_box` int(11) NOT NULL DEFAULT 0,
  `med_insurance` int(11) NOT NULL DEFAULT 0,
  `loans` int(11) NOT NULL DEFAULT 0,
  `transp` int(11) NOT NULL DEFAULT 0,
  `other_deductions` int(11) NOT NULL DEFAULT 0,
  `month` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `reg_by` int(11) DEFAULT NULL,
  `meal` float NOT NULL DEFAULT 0,
  `taswia` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=538 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_salary2`
--

CREATE TABLE `default_salary2` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `extra` int(11) NOT NULL DEFAULT 0,
  `incentive` int(11) NOT NULL DEFAULT 0,
  `adjustments` int(11) NOT NULL DEFAULT 0,
  `const_insurance` int(11) NOT NULL DEFAULT 0,
  `var_insurance` int(11) NOT NULL DEFAULT 0,
  `penalty` int(11) NOT NULL DEFAULT 0,
  `absence` int(11) NOT NULL DEFAULT 0,
  `lateness` int(11) NOT NULL DEFAULT 0,
  `phone` int(11) NOT NULL DEFAULT 0,
  `fellowship_box` int(11) NOT NULL DEFAULT 0,
  `med_insurance` int(11) NOT NULL DEFAULT 0,
  `loans` int(11) NOT NULL DEFAULT 0,
  `transp` int(11) NOT NULL DEFAULT 0,
  `other_deductions` int(11) NOT NULL DEFAULT 0,
  `month` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `reg_by` int(11) DEFAULT NULL,
  `meal` float NOT NULL DEFAULT 0,
  `taswia` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=428 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `default_search_index`
--

CREATE TABLE `default_search_index` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` char(255) NOT NULL,
  `description` text DEFAULT NULL,
  `keywords` text DEFAULT NULL,
  `keyword_hash` char(32) DEFAULT NULL,
  `module` varchar(40) DEFAULT NULL,
  `entry_key` varchar(100) DEFAULT NULL,
  `entry_plural` varchar(100) DEFAULT NULL,
  `entry_id` varchar(255) DEFAULT NULL,
  `uri` varchar(255) DEFAULT NULL,
  `cp_edit_uri` varchar(255) DEFAULT NULL,
  `cp_delete_uri` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique` (`module`,`entry_key`,`entry_id`(190)),
  FULLTEXT KEY `full search` (`title`,`description`,`keywords`)
) ENGINE=MyISAM AUTO_INCREMENT=653 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_serial`
--

CREATE TABLE `default_serial` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `serial` varchar(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5785 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_settings`
--

CREATE TABLE `default_settings` (
  `slug` varchar(30) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `type` set('text','textarea','password','select','select-multiple','radio','checkbox') NOT NULL,
  `default` text NOT NULL,
  `value` text NOT NULL,
  `options` text NOT NULL,
  `is_required` int(11) NOT NULL,
  `is_gui` int(11) NOT NULL,
  `module` varchar(50) NOT NULL,
  `order` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`slug`),
  UNIQUE KEY `unique_slug` (`slug`),
  KEY `slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_sidebar`
--

CREATE TABLE `default_sidebar` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `txt` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `href` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `class` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `has_ul` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `perm` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'X',
  `users` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `item_order` float NOT NULL,
  `icon` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_sub_sidebar`
--

CREATE TABLE `default_sub_sidebar` (
  `sub_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT 0,
  `txt` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `href` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `class` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `has_ul` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `id` varchar(250) DEFAULT NULL,
  `item_order` int(11) NOT NULL,
  `stat` varchar(25) NOT NULL DEFAULT 'Y',
  `icon` varchar(255) DEFAULT '<i class="entypo-minus"></i>',
  PRIMARY KEY (`sub_id`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_tash`
--

CREATE TABLE `default_tash` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `company_id` int(11) NOT NULL,
  `task_type` varchar(100) NOT NULL,
  `amount` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_task_type`
--

CREATE TABLE `default_task_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_type` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_teachers`
--

CREATE TABLE `default_teachers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(90) NOT NULL,
  `pic_path` varchar(250) DEFAULT NULL,
  `file_name` varchar(250) DEFAULT NULL,
  `email` varchar(250) NOT NULL,
  `pub_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp`
--

CREATE TABLE `default_temp` (
  `ser` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` int(11) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `project` varchar(150) DEFAULT NULL,
  `total` varchar(50) DEFAULT NULL,
  `time_from` varchar(10) NOT NULL DEFAULT '0',
  `time_to` varchar(10) NOT NULL DEFAULT '0',
  `prj` int(11) NOT NULL DEFAULT 0,
  `bldg` varchar(11) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `flat` varchar(100) DEFAULT NULL,
  `grand_amount` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`ser`)
) ENGINE=InnoDB AUTO_INCREMENT=4545 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp2`
--

CREATE TABLE `default_temp2` (
  `ser` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` varchar(50) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `project` varchar(150) DEFAULT NULL,
  `total` varchar(50) DEFAULT NULL,
  `time_from` varchar(10) NOT NULL DEFAULT '0',
  `time_to` varchar(10) NOT NULL DEFAULT '0',
  `prj` int(11) NOT NULL DEFAULT 0,
  `bldg` int(11) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `flat` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ser`)
) ENGINE=InnoDB AUTO_INCREMENT=1971 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp3`
--

CREATE TABLE `default_temp3` (
  `ser` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` varchar(50) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `project` varchar(150) DEFAULT NULL,
  `total` varchar(50) DEFAULT NULL,
  `time_from` varchar(10) NOT NULL DEFAULT '0',
  `time_to` varchar(10) NOT NULL DEFAULT '0',
  `prj` int(11) NOT NULL DEFAULT 0,
  `bldg` varchar(11) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `flat` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ser`)
) ENGINE=InnoDB AUTO_INCREMENT=245 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp_garden`
--

CREATE TABLE `default_temp_garden` (
  `ser` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` int(11) DEFAULT NULL,
  `prj` int(11) NOT NULL DEFAULT 0,
  `bldg` varchar(11) DEFAULT NULL,
  `flat` varchar(100) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`ser`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp_helio`
--

CREATE TABLE `default_temp_helio` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `member_no` int(11) NOT NULL DEFAULT 0,
  `area` float NOT NULL DEFAULT 0,
  `add_area` int(11) NOT NULL DEFAULT 0,
  `bldg` int(11) NOT NULL DEFAULT 0,
  `flat_num` varchar(50) DEFAULT NULL,
  `garden_area` int(11) NOT NULL DEFAULT 0,
  `garden_price` int(11) NOT NULL DEFAULT 0,
  `roof` int(11) NOT NULL DEFAULT 0,
  `add_area_price` int(11) NOT NULL DEFAULT 0,
  `wad_amount` int(11) NOT NULL DEFAULT 0,
  `total` float NOT NULL DEFAULT 0,
  `paid` float NOT NULL DEFAULT 0,
  `remain` float NOT NULL DEFAULT 0,
  `flag` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=586 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp_helio_bkup`
--

CREATE TABLE `default_temp_helio_bkup` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `member_no` int(11) NOT NULL DEFAULT 0,
  `area` float NOT NULL DEFAULT 0,
  `add_area` int(11) NOT NULL DEFAULT 0,
  `bldg` int(11) NOT NULL DEFAULT 0,
  `flat_num` varchar(50) DEFAULT NULL,
  `garden_area` int(11) NOT NULL DEFAULT 0,
  `garden_price` int(11) NOT NULL DEFAULT 0,
  `roof` int(11) NOT NULL DEFAULT 0,
  `add_area_price` int(11) NOT NULL DEFAULT 0,
  `wad_amount` int(11) NOT NULL DEFAULT 0,
  `total` int(11) NOT NULL DEFAULT 0,
  `paid` int(11) NOT NULL DEFAULT 0,
  `remain` int(11) NOT NULL DEFAULT 0,
  `flag` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=591 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_temp_res`
--

CREATE TABLE `default_temp_res` (
  `resv_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(8) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) DEFAULT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` double DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `flt_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`resv_id`),
  KEY `flat` (`flat_num`),
  KEY `bldg` (`bldg_id`),
  KEY `resv` (`resv_date`),
  KEY `client` (`cl_id`),
  KEY `prj_id` (`prj_id`),
  KEY `flt_id` (`flt_id`),
  KEY `floor` (`floor`),
  KEY `payment_type` (`payment_type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_temp_warnings`
--

CREATE TABLE `default_temp_warnings` (
  `ser` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `mem_no` varchar(50) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `project` varchar(150) DEFAULT NULL,
  `total` varchar(50) DEFAULT NULL,
  `time_from` varchar(10) NOT NULL DEFAULT '0',
  `time_to` varchar(10) NOT NULL DEFAULT '0',
  `prj_id` int(11) NOT NULL DEFAULT 0,
  `bldg` varchar(11) DEFAULT NULL,
  `flat_num` varchar(100) DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT 0,
  `grand_amount` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`ser`),
  KEY `default_temp_warnings_prj_id_index` (`prj_id`),
  KEY `default_temp_warnings_mem_no_index` (`mem_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `default_theme_options`
--

CREATE TABLE `default_theme_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(30) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `type` set('text','textarea','password','select','select-multiple','radio','checkbox','colour-picker') NOT NULL,
  `default` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  `options` text NOT NULL,
  `is_required` int(11) NOT NULL,
  `theme` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_tmp_resv`
--

CREATE TABLE `default_tmp_resv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mem_no` int(11) NOT NULL DEFAULT 0,
  `area` varchar(50) NOT NULL DEFAULT '0',
  `lvl` int(11) NOT NULL DEFAULT 0,
  `flat_no` int(11) NOT NULL DEFAULT 0,
  `bldg_no` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_total_price`
--

CREATE TABLE `default_total_price` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `yr` int(11) NOT NULL,
  `date` date NOT NULL,
  `month` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `inst_amount` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `interest` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prj_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=260 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_track`
--

CREATE TABLE `default_track` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `tab` varchar(200) NOT NULL,
  `action` varchar(850) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `cr_date` varchar(50) NOT NULL,
  `clause` varchar(50) NOT NULL,
  `edit_txt` varchar(450) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_transfer_aprv`
--

CREATE TABLE `default_transfer_aprv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) DEFAULT NULL,
  `file_no` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `flag` int(11) NOT NULL DEFAULT 0,
  `type` varchar(255) DEFAULT NULL,
  `to_cl` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_update`
--

CREATE TABLE `default_update` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `status` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_user_page`
--

CREATE TABLE `default_user_page` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(250) NOT NULL,
  `page` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_users`
--

CREATE TABLE `default_users` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(60) NOT NULL DEFAULT '',
  `password` varchar(100) NOT NULL DEFAULT '',
  `salt` varchar(6) NOT NULL DEFAULT '',
  `group_id` int(11) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  `activation_code` varchar(40) DEFAULT NULL,
  `created_on` int(11) NOT NULL,
  `last_login` int(11) NOT NULL,
  `username` varchar(20) DEFAULT NULL,
  `forgotten_password_code` varchar(40) DEFAULT NULL,
  `remember_code` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Registered User Information';

--
-- Table structure for table `default_vac`
--

CREATE TABLE `default_vac` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `date_from` date NOT NULL,
  `date_to` date NOT NULL,
  `time_from` time NOT NULL,
  `time_to` time NOT NULL,
  `type` varchar(10) NOT NULL,
  `crdate` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_variables`
--

CREATE TABLE `default_variables` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(250) DEFAULT NULL,
  `data` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_view`
--

CREATE TABLE `default_view` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `page` varchar(50) NOT NULL,
  `allow_vw` varchar(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `default_widget_areas`
--

CREATE TABLE `default_widget_areas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_widget_instances`
--

CREATE TABLE `default_widget_instances` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) DEFAULT NULL,
  `widget_id` int(11) DEFAULT NULL,
  `widget_area_id` int(11) DEFAULT NULL,
  `options` text NOT NULL,
  `order` int(11) NOT NULL DEFAULT 0,
  `created_on` int(11) NOT NULL DEFAULT 0,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `default_widgets`
--

CREATE TABLE `default_widgets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(100) NOT NULL DEFAULT '',
  `title` text NOT NULL,
  `description` text NOT NULL,
  `author` varchar(100) NOT NULL DEFAULT '',
  `website` varchar(255) NOT NULL DEFAULT '',
  `version` varchar(20) NOT NULL DEFAULT '0',
  `enabled` int(11) NOT NULL DEFAULT 1,
  `order` int(11) NOT NULL DEFAULT 0,
  `updated_on` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `emp_files`
--

CREATE TABLE `emp_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_ext` varchar(255) NOT NULL,
  `file_size` float NOT NULL,
  `folder` varchar(255) NOT NULL,
  `file_url` varchar(255) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`file_id`),
  KEY `Emp_Files_fk0` (`emp_id`),
  KEY `Emp_Files_fk1` (`uploaded_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `financial_stat`
--

CREATE TABLE `financial_stat` (
  `fin_id` int(11) NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `amount` float NOT NULL,
  `receipt_id` int(11) NOT NULL,
  `receipt_date` date NOT NULL,
  `bank_id` int(11) NOT NULL,
  `status` varchar(255) NOT NULL,
  `receipt_file` int(11) NOT NULL,
  `added_by` int(11) NOT NULL,
  `added_date` date NOT NULL,
  `currency` varchar(255) NOT NULL,
  `amount_type` varchar(255) NOT NULL,
  PRIMARY KEY (`fin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `flats`
--

CREATE TABLE `flats` (
  `flt_id` int(11) NOT NULL AUTO_INCREMENT,
  `area` varchar(20) NOT NULL,
  `txt` varchar(100) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `bldg_id` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `tot_ava` int(11) NOT NULL DEFAULT 0,
  `aprox_tot` varchar(15) NOT NULL DEFAULT '0',
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`flt_id`),
  KEY `status_fk1` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `garden_area`
--

CREATE TABLE `garden_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `bldg_no` int(11) NOT NULL,
  `flat_num` int(11) NOT NULL,
  `flat_area` float NOT NULL,
  `gard_area` float NOT NULL,
  `meter_price` float NOT NULL,
  `total` float NOT NULL,
  `inst_no` int(11) NOT NULL DEFAULT 10,
  `inst_amount` float NOT NULL DEFAULT 0,
  `added` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `garden_inst_table`
--

CREATE TABLE `garden_inst_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `year` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `inst_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'monthly',
  `inst_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '┘é╪│╪╖ ╪¡╪»┘è┘é┘ç',
  `gard_inst_amount` float NOT NULL DEFAULT 0,
  `flat_num` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `bldg_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `area` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `total` float DEFAULT NULL,
  `prj_id` varchar(20) DEFAULT NULL,
  `comments` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `full_date` varchar(20) DEFAULT NULL,
  `yr_mon` int(11) NOT NULL DEFAULT 0,
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=973 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `heliopolies2`
--

CREATE TABLE `heliopolies2` (
  `A` int(11) DEFAULT NULL,
  `B` varchar(33) DEFAULT NULL,
  `C` int(11) DEFAULT NULL,
  `D` varchar(17) DEFAULT NULL,
  `E` varchar(8) DEFAULT NULL,
  `F` int(11) DEFAULT NULL,
  `G` int(11) DEFAULT NULL,
  `H` int(11) DEFAULT NULL,
  `I` int(11) DEFAULT NULL,
  `J` int(11) DEFAULT NULL,
  `K` varchar(16) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `inst_table`
--

CREATE TABLE `inst_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `year` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `inst_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `inst_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `inst_amount` int(11) NOT NULL DEFAULT 0,
  `inst_addon` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `addon_amount` int(11) NOT NULL DEFAULT 0,
  `subtotal` int(11) NOT NULL DEFAULT 0,
  `total` int(11) NOT NULL DEFAULT 0,
  `flat_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `project` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `comments` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `full_date` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `yr_mon` int(11) NOT NULL DEFAULT 0,
  `flat_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `bldg_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `area` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19768 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `installment_type`
--

CREATE TABLE `installment_type` (
  `id` int(11) NOT NULL,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `installments`
--

CREATE TABLE `installments` (
  `inst_id` int(11) NOT NULL AUTO_INCREMENT,
  `resv_id` int(11) NOT NULL,
  `inst_amount` float NOT NULL DEFAULT 0,
  `pay_date` date NOT NULL,
  `paid` tinyint(1) NOT NULL DEFAULT 0,
  `rem_inst` int(11) NOT NULL,
  `penalty` int(11) DEFAULT NULL,
  `collected_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`inst_id`),
  KEY `installments_fk0` (`resv_id`),
  KEY `installments_fk1` (`collected_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(100) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(100) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `mv_receipts`
--

CREATE TABLE `mv_receipts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `bnk_number` varchar(255) DEFAULT '0',
  `cl_id` int(11) NOT NULL,
  `reg_by` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` varchar(50) NOT NULL,
  `rev_date` date DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` varchar(60) DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `deleted_by` int(11) NOT NULL DEFAULT 0,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `trans_id` int(11) NOT NULL DEFAULT 0,
  `chk` varchar(1) NOT NULL DEFAULT 'N',
  `rev` varchar(2) NOT NULL DEFAULT 'N',
  `cnf` varchar(1) NOT NULL DEFAULT 'N',
  `chk_ids` varchar(350) DEFAULT NULL,
  `rel_date` date DEFAULT NULL,
  `locked` varchar(1) NOT NULL DEFAULT 'N',
  `penality` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `reg_by` (`reg_by`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=91333 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `mv_receipts2`
--

CREATE TABLE `mv_receipts2` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `cl_id` int(11) NOT NULL,
  `reg_by` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `date` date NOT NULL,
  `type` int(11) DEFAULT NULL,
  `prj_id` int(11) DEFAULT NULL,
  `bank_account` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `cl_id` (`cl_id`),
  KEY `reg_by` (`reg_by`),
  KEY `type` (`type`),
  KEY `number` (`number`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `mv_reservations`
--

CREATE TABLE `mv_reservations` (
  `resv_id` int(11) NOT NULL,
  `cl_id` int(11) NOT NULL,
  `flt_id` int(11) NOT NULL,
  `flat_num` varchar(10) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  `bldg_id` varchar(8) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `resv_date` varchar(70) DEFAULT NULL,
  `resv_by` int(11) DEFAULT NULL,
  `payment_type` bigint(20) DEFAULT NULL,
  `tot_inst_years` int(11) DEFAULT NULL,
  `inst_start_date` date DEFAULT NULL,
  `tot_inst` int(11) DEFAULT NULL,
  `alt_id` int(11) DEFAULT NULL,
  `upd_by` int(11) NOT NULL DEFAULT 0,
  `flt_order` varchar(11) DEFAULT NULL,
  `park` varchar(1) NOT NULL DEFAULT 'N',
  `park_count` int(11) NOT NULL DEFAULT 0,
  `garden` varchar(1) NOT NULL DEFAULT 'N',
  `garden_size` float NOT NULL DEFAULT 0,
  `roof` varchar(1) NOT NULL DEFAULT 'N',
  `roof_size` float NOT NULL DEFAULT 1,
  `sess` int(11) NOT NULL DEFAULT 2,
  `res_kind` varchar(1) NOT NULL DEFAULT '0',
  `num_days` varchar(2) NOT NULL DEFAULT '0',
  `subsess` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  KEY `password_resets_email_index` (`email`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `payment_types`
--

CREATE TABLE `payment_types` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `prj_id` int(11) NOT NULL AUTO_INCREMENT,
  `cont_id` int(11) NOT NULL,
  `cons_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `prj_date` date NOT NULL,
  `prj_resv_date` date NOT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `account_no` text DEFAULT NULL,
  `status` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`prj_id`),
  KEY `consultant` (`cons_id`),
  KEY `status_fk0` (`status`),
  KEY `contractor` (`cont_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `projects_banks_account`
--

CREATE TABLE `projects_banks_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prj_id` int(11) NOT NULL,
  `bank_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `projects_files`
--

CREATE TABLE `projects_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_ext` varchar(255) NOT NULL,
  `file_size` float NOT NULL,
  `folder` varchar(255) NOT NULL,
  `file_url` varchar(255) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `relation_type`
--

CREATE TABLE `relation_type` (
  `id` int(11) NOT NULL,
  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `role_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `sheet1`
--

CREATE TABLE `sheet1` (
  `arabic_name` varchar(43) DEFAULT NULL,
  `nat_id` varchar(10) DEFAULT NULL,
  `address` varchar(115) DEFAULT NULL,
  `mobile` varchar(11) DEFAULT NULL,
  `file_no` int(11) DEFAULT NULL,
  `old_member_no` int(11) DEFAULT NULL,
  `member_no` int(11) DEFAULT NULL,
  `member_start_date` varchar(10) DEFAULT NULL,
  `flag` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `states`
--

CREATE TABLE `states` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `status`
--

CREATE TABLE `status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(64) DEFAULT NULL,
  `status_name_ar` varchar(64) NOT NULL,
  `status_name_en` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_flats`
--

CREATE TABLE `temp_flats` (
  `flt_id` int(11) NOT NULL AUTO_INCREMENT,
  `area` varchar(20) NOT NULL,
  `txt` varchar(100) DEFAULT NULL,
  `prj_id` int(11) NOT NULL,
  `bldg_id` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `flag` varchar(1) NOT NULL DEFAULT 'Y',
  `tot_ava` int(11) NOT NULL DEFAULT 0,
  `aprox_tot` varchar(15) NOT NULL DEFAULT '0',
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`flt_id`),
  KEY `status_fk1` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_inst_table`
--

CREATE TABLE `temp_inst_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `year` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `inst_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `inst_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `inst_amount` int(11) NOT NULL DEFAULT 0,
  `inst_addon` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `addon_amount` int(11) NOT NULL DEFAULT 0,
  `subtotal` int(11) NOT NULL DEFAULT 0,
  `total` int(11) NOT NULL DEFAULT 0,
  `flat_type` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `project` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `comments` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `full_date` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `yr_mon` int(11) NOT NULL DEFAULT 0,
  `flat_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `bldg_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `area` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `sess` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `cl_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(100) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=1007 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `vacation_types`
--

CREATE TABLE `vacation_types` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `vacations`
--

CREATE TABLE `vacations` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `emp_id` int(11) NOT NULL,
  `date_from` date NOT NULL,
  `date_to` date NOT NULL,
  `days_no` int(11) NOT NULL,
  `time_from` time NOT NULL DEFAULT '00:00:00',
  `time_to` time NOT NULL DEFAULT '00:00:00',
  `type` bigint(20) unsigned NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `approved_by` int(11) DEFAULT NULL,
  `approval_date` date DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `emp_vacation` (`emp_id`),
  KEY `manager_approval` (`approved_by`),
  KEY `vacation_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `webusers`
--

CREATE TABLE `webusers` (
  `web_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(255) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  PRIMARY KEY (`web_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;


