-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 04, 2026 at 08:07 PM
-- Server version: 10.3.39-MariaDB-log-cll-lve
-- PHP Version: 8.1.34

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `dzvisual_homestay`
--

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

--
-- Table structure for table `actions`
--

DROP TABLE IF EXISTS `actions`;
CREATE TABLE `actions` (
  `act_id` int(11) NOT NULL,
  `chat_id` varchar(50) NOT NULL,
  `act_now` varchar(155) NOT NULL,
  `act_next` varchar(155) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `admin`
--

DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `a_id` int(4) NOT NULL,
  `a_username` varchar(255) NOT NULL,
  `a_password` varchar(15) NOT NULL,
  `a_auth` int(2) NOT NULL,
  `a_status` int(2) DEFAULT NULL,
  `tg_chat_id` varchar(255) DEFAULT NULL,
  `tg_cache` varchar(255) DEFAULT NULL,
  `admin_id` int(155) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `app_notification`
--

DROP TABLE IF EXISTS `app_notification`;
CREATE TABLE `app_notification` (
  `an_id` int(155) NOT NULL,
  `an_message` varchar(255) NOT NULL,
  `an_device` varchar(255) NOT NULL,
  `tg_chat_id` varchar(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `bill_type`
--

DROP TABLE IF EXISTS `bill_type`;
CREATE TABLE `bill_type` (
  `bl_id` int(155) NOT NULL,
  `bl_title` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `chats`
--

DROP TABLE IF EXISTS `chats`;
CREATE TABLE `chats` (
  `chat_id` int(155) NOT NULL,
  `tg_chat_id` int(155) NOT NULL,
  `content` varchar(555) NOT NULL,
  `receive_send` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `claims`
--

DROP TABLE IF EXISTS `claims`;
CREATE TABLE `claims` (
  `c_id` int(155) NOT NULL,
  `c_title` varchar(255) NOT NULL,
  `c_date` date DEFAULT NULL,
  `c_status` int(1) DEFAULT 0,
  `c_amount` decimal(5,2) NOT NULL,
  `c_file` varchar(255) NOT NULL,
  `a_id` int(155) DEFAULT NULL COMMENT 'admin',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `clean`
--

DROP TABLE IF EXISTS `clean`;
CREATE TABLE `clean` (
  `c_id` int(11) NOT NULL,
  `rv_id` int(11) NOT NULL,
  `c_amount` decimal(7,2) NOT NULL,
  `c_note` varchar(100) NOT NULL,
  `c_status` int(2) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `communication_control`
--

DROP TABLE IF EXISTS `communication_control`;
CREATE TABLE `communication_control` (
  `cc_id` int(155) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `cm_id` int(155) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `communication_materials`
--

DROP TABLE IF EXISTS `communication_materials`;
CREATE TABLE `communication_materials` (
  `cm_id` int(155) NOT NULL,
  `cm_title` varchar(255) DEFAULT NULL,
  `cm_message` varchar(555) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `damage_reports`
--

DROP TABLE IF EXISTS `damage_reports`;
CREATE TABLE `damage_reports` (
  `id` int(11) NOT NULL,
  `r_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `report_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `telegram_user_id` bigint(20) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `deposit`
--

DROP TABLE IF EXISTS `deposit`;
CREATE TABLE `deposit` (
  `dp_id` int(155) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `dp_received_at` datetime DEFAULT NULL,
  `dp_verified_at` datetime DEFAULT NULL,
  `dp_verified_by` int(155) DEFAULT NULL,
  `dp_amount` decimal(5,2) NOT NULL,
  `dp_method` int(2) DEFAULT NULL,
  `dp_status` int(2) DEFAULT NULL,
  `dp_file` varchar(555) DEFAULT NULL,
  `dp_refund_amount` decimal(7,2) DEFAULT NULL,
  `dp_refund_at` date DEFAULT NULL,
  `dp_refund_note` varchar(555) DEFAULT NULL,
  `dp_refund_file` varchar(555) DEFAULT NULL,
  `dp_forfeited_at` date DEFAULT NULL,
  `dp_forfeited_amount` decimal(7,2) DEFAULT NULL,
  `dp_forfeit_note` varchar(555) DEFAULT NULL,
  `dp_ready_at` datetime DEFAULT NULL,
  `dp_ready_by` int(155) DEFAULT NULL,
  `dp_receiver_holder` varchar(255) DEFAULT NULL,
  `dp_receiver_acc` varchar(255) DEFAULT NULL,
  `dp_receiver_bank` varchar(255) DEFAULT NULL,
  `dp_note` varchar(555) DEFAULT NULL,
  `dp_wa_sent_at` datetime DEFAULT NULL,
  `dp_wa_sent_by` int(155) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `dp_telegram` varchar(5555) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `deposit_log`
--

DROP TABLE IF EXISTS `deposit_log`;
CREATE TABLE `deposit_log` (
  `dpl_id` int(155) NOT NULL,
  `dpl_title` varchar(555) NOT NULL,
  `dp_id` int(155) NOT NULL,
  `dpl_ip_address` varchar(15) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `earning`
--

DROP TABLE IF EXISTS `earning`;
CREATE TABLE `earning` (
  `e_id` int(155) NOT NULL,
  `e_type_id` int(5) NOT NULL,
  `e_date` date DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `e_amount` decimal(7,2) DEFAULT NULL,
  `e_note` varchar(500) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `email_activity`
--

DROP TABLE IF EXISTS `email_activity`;
CREATE TABLE `email_activity` (
  `ea_id` int(155) NOT NULL,
  `ea_email_sender` varchar(255) NOT NULL,
  `ea_email_receiver` varchar(255) NOT NULL,
  `ea_subject` varchar(500) NOT NULL,
  `ea_message` varchar(5000) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `ep_apartments`
--

DROP TABLE IF EXISTS `ep_apartments`;
CREATE TABLE `ep_apartments` (
  `apt_id` int(155) NOT NULL,
  `apt_title` varchar(255) NOT NULL,
  `r_id` int(155) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `expenses`
--

DROP TABLE IF EXISTS `expenses`;
CREATE TABLE `expenses` (
  `exp_id` int(155) NOT NULL,
  `exp_bank` varchar(25) NOT NULL,
  `exp_acc` varchar(25) NOT NULL,
  `exp_inoutcome` int(1) NOT NULL,
  `exp_amount` decimal(7,5) NOT NULL,
  `exp_title` varchar(255) NOT NULL,
  `exp_sms_no` varchar(15) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `expenses_log`
--

DROP TABLE IF EXISTS `expenses_log`;
CREATE TABLE `expenses_log` (
  `exl_id` int(155) NOT NULL,
  `ex_id` int(155) DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `exlt_id` int(155) DEFAULT NULL COMMENT 'type',
  `exl_report` varchar(555) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `exl_ip_address` varchar(55) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `expenses_type`
--

DROP TABLE IF EXISTS `expenses_type`;
CREATE TABLE `expenses_type` (
  `et_id` int(155) NOT NULL,
  `et_title` varchar(255) NOT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `guest`
--

DROP TABLE IF EXISTS `guest`;
CREATE TABLE `guest` (
  `g_id` int(4) NOT NULL,
  `g_full_name` varchar(255) NOT NULL,
  `g_id_no` varchar(20) NOT NULL,
  `g_gendar` int(2) NOT NULL,
  `g_contact` varchar(20) NOT NULL,
  `g_email` varchar(100) NOT NULL,
  `g_photo` varchar(20) NOT NULL,
  `g_status` int(2) NOT NULL,
  `g_timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `housekeep`
--

DROP TABLE IF EXISTS `housekeep`;
CREATE TABLE `housekeep` (
  `hk_id` int(115) NOT NULL,
  `rv_id` int(155) DEFAULT NULL,
  `r_id` int(115) NOT NULL,
  `hk_date` date NOT NULL,
  `hk_co_time` time DEFAULT NULL,
  `hk_start` datetime DEFAULT NULL,
  `hk_end` datetime DEFAULT NULL,
  `hk_bedsheet` int(1) NOT NULL DEFAULT 0,
  `hk_status` int(2) DEFAULT 0,
  `hk_payment` decimal(7,2) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL COMMENT 'admin/staff id',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `housekeep_admin`
--

DROP TABLE IF EXISTS `housekeep_admin`;
CREATE TABLE `housekeep_admin` (
  `ha_id` int(155) NOT NULL,
  `hk_id` int(155) NOT NULL,
  `a_id` int(155) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `housekeep_staff`
--

DROP TABLE IF EXISTS `housekeep_staff`;
CREATE TABLE `housekeep_staff` (
  `hks_id` int(155) NOT NULL,
  `hk_id` int(155) NOT NULL,
  `s_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `inventories`
--

DROP TABLE IF EXISTS `inventories`;
CREATE TABLE `inventories` (
  `iv_id` int(115) NOT NULL,
  `iv_title` varchar(255) NOT NULL,
  `iv_code` varchar(255) DEFAULT NULL,
  `iv_bcode` varchar(255) DEFAULT NULL,
  `iv_price` decimal(7,2) DEFAULT NULL,
  `iv_qty` int(11) DEFAULT 0,
  `iv_photolink` varchar(255) DEFAULT NULL,
  `iv_note` varchar(255) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL COMMENT 'keyin pic',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `items`
--

DROP TABLE IF EXISTS `items`;
CREATE TABLE `items` (
  `i_id` int(155) NOT NULL,
  `i_title` varchar(255) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `key_handover`
--

DROP TABLE IF EXISTS `key_handover`;
CREATE TABLE `key_handover` (
  `kh_id` int(155) NOT NULL,
  `kh_date` date NOT NULL,
  `kh_time` time NOT NULL,
  `r_id` int(155) NOT NULL,
  `u_id` int(155) NOT NULL,
  `kh_car_type` varchar(25) NOT NULL,
  `kh_car_no` varchar(25) NOT NULL,
  `kh_name` varchar(55) NOT NULL,
  `kh_contact` varchar(15) NOT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `logs`
--

DROP TABLE IF EXISTS `logs`;
CREATE TABLE `logs` (
  `lg_id` int(155) NOT NULL,
  `lg_message` varchar(555) NOT NULL,
  `rv_id` int(155) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `lg_ip_address` varchar(25) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `owners`
--

DROP TABLE IF EXISTS `owners`;
CREATE TABLE `owners` (
  `o_id` int(11) NOT NULL,
  `o_username` varchar(15) DEFAULT NULL,
  `o_password` varchar(15) DEFAULT NULL,
  `o_auth` int(3) DEFAULT NULL,
  `o_name` varchar(50) NOT NULL,
  `o_contact` varchar(15) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `payment`
--

DROP TABLE IF EXISTS `payment`;
CREATE TABLE `payment` (
  `py_id` int(11) NOT NULL,
  `py_no` varchar(25) NOT NULL,
  `rv_id` int(11) NOT NULL,
  `py_amount` decimal(7,2) NOT NULL,
  `py_method` varchar(20) NOT NULL,
  `py_date` date NOT NULL,
  `py_note` varchar(100) NOT NULL,
  `py_status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `payments`
--

DROP TABLE IF EXISTS `payments`;
CREATE TABLE `payments` (
  `py_id` int(155) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `u_id` int(155) DEFAULT NULL,
  `py_date` date NOT NULL,
  `py_amount` decimal(5,2) NOT NULL,
  `py_status` int(2) NOT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `platforms`
--

DROP TABLE IF EXISTS `platforms`;
CREATE TABLE `platforms` (
  `pt_id` int(155) NOT NULL,
  `pt_title` varchar(255) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `platform_income`
--

DROP TABLE IF EXISTS `platform_income`;
CREATE TABLE `platform_income` (
  `pi_id` int(155) NOT NULL,
  `pt_id` int(5) NOT NULL,
  `pi_date` date DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `pi_amount` decimal(7,2) DEFAULT NULL,
  `pi_note` varchar(500) NOT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `properties`
--

DROP TABLE IF EXISTS `properties`;
CREATE TABLE `properties` (
  `pty_id` int(155) NOT NULL,
  `pty_title` varchar(255) NOT NULL,
  `pty_short` varchar(25) DEFAULT NULL,
  `pty_code` varchar(5) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `property`
--

DROP TABLE IF EXISTS `property`;
CREATE TABLE `property` (
  `pro_id` int(11) NOT NULL,
  `pro_title` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `property_admin`
--

DROP TABLE IF EXISTS `property_admin`;
CREATE TABLE `property_admin` (
  `pa_id` int(155) NOT NULL,
  `property_id` int(155) NOT NULL,
  `admin_id` int(155) NOT NULL,
  `added_by` int(155) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `reservation`
--

DROP TABLE IF EXISTS `reservation`;
CREATE TABLE `reservation` (
  `rv_id` int(11) NOT NULL,
  `rv_no` varchar(155) DEFAULT NULL,
  `rv_guest` varchar(255) DEFAULT NULL,
  `rv_contact` varchar(15) DEFAULT NULL,
  `rv_email` varchar(255) DEFAULT NULL,
  `rv_apartment` varchar(255) DEFAULT NULL,
  `u_id` int(11) DEFAULT NULL,
  `r_id` int(11) DEFAULT NULL,
  `rv_occ_id` int(2) NOT NULL DEFAULT 0 COMMENT 'occuption type, 0 - entire, 1 - master, 2 - middle, 3 - single',
  `rv_ci_date` date DEFAULT NULL,
  `rv_ci_time` time DEFAULT '15:00:00',
  `rv_night` int(2) NOT NULL DEFAULT 1,
  `rv_co_date` date DEFAULT NULL,
  `rv_co_time` time DEFAULT '12:00:00',
  `rv_amount` decimal(7,2) DEFAULT NULL,
  `rv_svc_tax` int(11) DEFAULT NULL,
  `rv_tax` int(3) DEFAULT NULL,
  `rv_total` decimal(7,2) DEFAULT 0.00,
  `rv_total_confirmed` decimal(7,2) DEFAULT NULL,
  `rv_total_by_import` decimal(7,2) DEFAULT NULL COMMENT 'price imported via PHPExcel',
  `rv_cleaning_fee` decimal(7,2) DEFAULT NULL,
  `rv_platform` int(11) DEFAULT NULL,
  `rv_notes` varchar(255) DEFAULT NULL,
  `rv_status` int(2) DEFAULT NULL,
  `rv_checklist` int(1) DEFAULT NULL,
  `rv_byowner` int(1) NOT NULL DEFAULT 0 COMMENT 'by owner',
  `a_id` int(155) DEFAULT NULL,
  `rv_secret` varchar(155) DEFAULT NULL,
  `rv_ic_file` varchar(555) DEFAULT NULL,
  `rv_ic_verified_at` datetime DEFAULT NULL,
  `rv_deposit_verified_at` datetime DEFAULT NULL,
  `rv_respondio_id` int(155) DEFAULT NULL,
  `rv_airbnb_id` int(155) DEFAULT NULL,
  `rv_guest_name` varchar(255) DEFAULT NULL COMMENT 'user keyin',
  `rv_guest_contact` varchar(15) DEFAULT NULL COMMENT 'user keyin',
  `rv_guest_platno` varchar(10) DEFAULT NULL,
  `rv_room_bathroom` int(155) NOT NULL DEFAULT 0,
  `rv_wa_greeting` int(1) DEFAULT NULL,
  `rv_wa_deposit` int(1) DEFAULT NULL,
  `rv_wa_pre` int(1) DEFAULT NULL,
  `rv_wa_acc_dzv` int(1) DEFAULT NULL,
  `rv_wa_ic` int(1) DEFAULT NULL,
  `rv_wa_ci` int(1) DEFAULT NULL,
  `rv_wa_sci` int(1) DEFAULT NULL,
  `rv_wa_co` int(1) DEFAULT NULL,
  `rv_wa_sco` int(1) DEFAULT NULL,
  `rv_wa_acc_guest` int(1) DEFAULT NULL,
  `rv_wa_tq` int(1) DEFAULT NULL,
  `rv_wa_refund` int(1) DEFAULT NULL,
  `rv_review_status` int(155) DEFAULT NULL,
  `rv_reviewed_at` datetime DEFAULT NULL,
  `rv_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `reservation_log`
--

DROP TABLE IF EXISTS `reservation_log`;
CREATE TABLE `reservation_log` (
  `rl_id` int(155) NOT NULL,
  `rl_title` varchar(555) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `rl_ip_address` varchar(15) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `reservation_payment`
--

DROP TABLE IF EXISTS `reservation_payment`;
CREATE TABLE `reservation_payment` (
  `rvp_id` int(155) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `rvp_amount` decimal(7,2) NOT NULL,
  `rvp_date` date NOT NULL,
  `rvp_method` int(1) NOT NULL DEFAULT 0,
  `rvp_note` varchar(255) DEFAULT NULL,
  `rvp_status` int(1) NOT NULL DEFAULT 0,
  `rvp_uploaded_by` int(155) DEFAULT NULL COMMENT 'admin id or guest id',
  `rvp_verified_by` int(11) DEFAULT NULL COMMENT 'admin id',
  `rvp_filename` varchar(55) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `reservation_payment_log`
--

DROP TABLE IF EXISTS `reservation_payment_log`;
CREATE TABLE `reservation_payment_log` (
  `rvpl_id` int(155) NOT NULL,
  `rv_id` int(155) DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `exlt_id` int(155) DEFAULT NULL COMMENT 'type',
  `rvpl_report` varchar(555) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `rvpl_ip_address` varchar(55) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `reservation_telegram`
--

DROP TABLE IF EXISTS `reservation_telegram`;
CREATE TABLE `reservation_telegram` (
  `rt_id` int(155) NOT NULL,
  `rv_id` int(155) NOT NULL,
  `rt_action_next` varchar(555) NOT NULL,
  `chat_id` varchar(22) NOT NULL,
  `rt_status` int(1) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `re_id`
--

DROP TABLE IF EXISTS `re_id`;
CREATE TABLE `re_id` (
  `re_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `re_price` decimal(7,2) NOT NULL,
  `re_status` int(1) NOT NULL,
  `a_id` int(155) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room`
--

DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
  `r_id` int(11) NOT NULL,
  `o_id` int(11) DEFAULT NULL,
  `r_type` varchar(50) NOT NULL,
  `r_no` varchar(10) NOT NULL,
  `r_pax` int(2) DEFAULT NULL,
  `r_place` varchar(20) NOT NULL,
  `r_status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `rooms`
--

DROP TABLE IF EXISTS `rooms`;
CREATE TABLE `rooms` (
  `r_id` int(11) NOT NULL,
  `r_no` varchar(155) DEFAULT NULL,
  `r_title` varchar(55) DEFAULT NULL,
  `r_code` varchar(10) DEFAULT NULL,
  `r_type` int(3) DEFAULT NULL,
  `r_pax` int(3) DEFAULT NULL,
  `r_rental` int(11) NOT NULL,
  `r_rental_date_start` date NOT NULL,
  `r_rental_date_end` date NOT NULL,
  `r_status` int(1) NOT NULL DEFAULT 0 COMMENT 'activate or deactivate',
  `r_profit_sharing` decimal(4,2) DEFAULT NULL,
  `r_housekeep_fee` decimal(7,2) NOT NULL DEFAULT 0.00 COMMENT 'fee paid by host',
  `r_cleaning_fee` decimal(7,2) NOT NULL COMMENT 'fee payable to cleaner',
  `r_profit_type` int(2) NOT NULL DEFAULT 1,
  `r_rv_deposit` decimal(7,2) NOT NULL DEFAULT 100.00,
  `r_tg_chat_id` varchar(25) DEFAULT NULL,
  `r_ci_details` varchar(1111) DEFAULT NULL,
  `r_co_details` varchar(1111) DEFAULT NULL,
  `u_id` int(11) DEFAULT NULL,
  `o_id` int(155) DEFAULT NULL,
  `p_id` int(11) NOT NULL,
  `r_bank_acc` varchar(25) DEFAULT NULL,
  `r_bank_holder` varchar(255) DEFAULT NULL,
  `r_bank_name` varchar(255) DEFAULT NULL,
  `special_management` int(1) NOT NULL DEFAULT 0,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_admin`
--

DROP TABLE IF EXISTS `room_admin`;
CREATE TABLE `room_admin` (
  `ra_id` int(155) NOT NULL,
  `room_id` int(155) NOT NULL,
  `admin_id` int(155) NOT NULL,
  `added_by` int(155) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_bill`
--

DROP TABLE IF EXISTS `room_bill`;
CREATE TABLE `room_bill` (
  `rb_id` int(155) NOT NULL,
  `bl_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `rb_acc` varchar(155) DEFAULT NULL,
  `rb_amount` decimal(10,0) DEFAULT NULL,
  `rb_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_cards`
--

DROP TABLE IF EXISTS `room_cards`;
CREATE TABLE `room_cards` (
  `rc_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `rc_no` varchar(255) DEFAULT NULL,
  `rc_type` int(11) DEFAULT NULL,
  `rc_issued_at` date DEFAULT NULL,
  `rc_terminated_at` date DEFAULT NULL,
  `rc_r_inuse` int(155) DEFAULT NULL,
  `rc_inuse_staff` int(155) DEFAULT NULL COMMENT 'staff using card',
  `rc_note` varchar(555) DEFAULT NULL,
  `rc_file` varchar(255) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_expenses`
--

DROP TABLE IF EXISTS `room_expenses`;
CREATE TABLE `room_expenses` (
  `re_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `re_type` int(3) NOT NULL,
  `re_initial` int(1) NOT NULL DEFAULT 0 COMMENT 'initial item, 0 no, 1 yes',
  `re_title` varchar(255) DEFAULT NULL,
  `re_note` varchar(555) NOT NULL,
  `re_date` date DEFAULT NULL,
  `re_amount` decimal(7,2) NOT NULL,
  `re_filename` varchar(255) DEFAULT NULL,
  `re_claim_by` int(2) DEFAULT NULL,
  `re_claim_status` int(1) DEFAULT NULL,
  `re_claimed_at` date DEFAULT NULL,
  `re_claim_file` varchar(555) DEFAULT NULL,
  `re_claim_note` varchar(555) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `s_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_housekeeper`
--

DROP TABLE IF EXISTS `room_housekeeper`;
CREATE TABLE `room_housekeeper` (
  `rh_id` int(155) NOT NULL,
  `r_id` int(115) NOT NULL,
  `u_id` int(155) NOT NULL,
  `rh_date` date NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_inventory`
--

DROP TABLE IF EXISTS `room_inventory`;
CREATE TABLE `room_inventory` (
  `ri_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `iv_id` int(155) NOT NULL,
  `ri_date` date DEFAULT NULL,
  `ri_qty` int(155) NOT NULL,
  `ri_photo_link` varchar(255) DEFAULT NULL,
  `ri_note` varchar(255) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `ri_title` varchar(255) DEFAULT NULL,
  `ri_price` decimal(7,2) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_item`
--

DROP TABLE IF EXISTS `room_item`;
CREATE TABLE `room_item` (
  `ri_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `i_id` int(155) NOT NULL,
  `ri_pc` int(3) NOT NULL DEFAULT 1,
  `s_id` int(155) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_maintenance`
--

DROP TABLE IF EXISTS `room_maintenance`;
CREATE TABLE `room_maintenance` (
  `rm_id` int(11) NOT NULL,
  `r_id` int(11) NOT NULL,
  `rm_date` date NOT NULL,
  `rm_type` int(11) NOT NULL,
  `a_id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_report`
--

DROP TABLE IF EXISTS `room_report`;
CREATE TABLE `room_report` (
  `rr_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL,
  `rr_title` varchar(555) NOT NULL,
  `rr_description` varchar(1111) DEFAULT NULL,
  `rr_date` date DEFAULT NULL,
  `rr_status` int(2) NOT NULL DEFAULT 0,
  `s_id` int(155) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_type`
--

DROP TABLE IF EXISTS `room_type`;
CREATE TABLE `room_type` (
  `rt_id` int(155) NOT NULL,
  `rt_title` varchar(255) NOT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `room_utility`
--

DROP TABLE IF EXISTS `room_utility`;
CREATE TABLE `room_utility` (
  `ru_id` int(155) NOT NULL,
  `r_id` int(155) NOT NULL COMMENT 'room id',
  `uty_id` int(155) NOT NULL COMMENT 'utility id',
  `ru_acc_no` varchar(55) DEFAULT NULL,
  `ru_acc_name` varchar(255) DEFAULT NULL,
  `ru_acc_due` date DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `router_apartment`
--

DROP TABLE IF EXISTS `router_apartment`;
CREATE TABLE `router_apartment` (
  `ra_id` int(155) NOT NULL,
  `ra_title` varchar(255) NOT NULL,
  `r_id` int(155) NOT NULL,
  `a_id` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `salary_payment`
--

DROP TABLE IF EXISTS `salary_payment`;
CREATE TABLE `salary_payment` (
  `sp_id` int(155) NOT NULL,
  `ss_id` int(155) NOT NULL,
  `sp_amount` decimal(7,2) DEFAULT NULL,
  `sp_date` date DEFAULT NULL,
  `sp_note` varchar(555) DEFAULT NULL,
  `sp_filename` varchar(255) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
  `s_id` int(11) NOT NULL,
  `chat_id` varchar(11) NOT NULL,
  `s_req` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `sms_activity`
--

DROP TABLE IF EXISTS `sms_activity`;
CREATE TABLE `sms_activity` (
  `sa_id` int(155) NOT NULL,
  `sa_activity` varchar(15) NOT NULL,
  `sa_message` varchar(500) NOT NULL,
  `sa_receiver_no` varchar(15) NOT NULL,
  `sa_receiver_name` varchar(25) NOT NULL,
  `sa_receiver_tgchatid` varchar(15) NOT NULL,
  `sa_sender_no` varchar(15) NOT NULL,
  `sa_sender_name` varchar(25) NOT NULL,
  `sa_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staffs`
--

DROP TABLE IF EXISTS `staffs`;
CREATE TABLE `staffs` (
  `s_id` int(155) NOT NULL,
  `s_fullname` varchar(255) DEFAULT NULL,
  `s_nickname` varchar(255) NOT NULL,
  `s_namecode` varchar(255) DEFAULT NULL,
  `s_username` varchar(25) DEFAULT NULL,
  `s_password` varchar(25) DEFAULT NULL,
  `s_contact` varchar(15) NOT NULL,
  `s_email` varchar(255) NOT NULL,
  `s_authorization` int(2) NOT NULL DEFAULT 0,
  `s_salary` decimal(7,2) DEFAULT NULL,
  `s_date_start` date DEFAULT NULL,
  `s_date_end` date DEFAULT NULL,
  `s_status` int(1) DEFAULT 0,
  `s_note` varchar(255) DEFAULT NULL,
  `s_e_contact` varchar(15) DEFAULT NULL COMMENT 'emergency contact',
  `s_e_name` varchar(255) DEFAULT NULL,
  `s_e_relationship` int(3) DEFAULT NULL COMMENT 'emergency relationship',
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `staff_salary`
--

DROP TABLE IF EXISTS `staff_salary`;
CREATE TABLE `staff_salary` (
  `ss_id` int(155) NOT NULL,
  `s_id` int(155) NOT NULL,
  `ss_amount` decimal(7,2) DEFAULT NULL,
  `ss_monthyear` date DEFAULT NULL,
  `ss_date` date DEFAULT NULL,
  `ss_status` int(2) DEFAULT NULL,
  `ss_filename` varchar(555) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `stocks`
--

DROP TABLE IF EXISTS `stocks`;
CREATE TABLE `stocks` (
  `s_id` int(115) NOT NULL,
  `s_title` varchar(255) NOT NULL,
  `s_code` varchar(255) DEFAULT NULL,
  `s_bcode` varchar(255) DEFAULT NULL,
  `s_price` decimal(7,2) DEFAULT NULL,
  `s_qty` int(11) DEFAULT 0,
  `s_photolink` varchar(255) DEFAULT NULL,
  `s_note` varchar(255) DEFAULT NULL,
  `u_id` int(1) DEFAULT NULL COMMENT 'keyin pic',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `teams`
--

DROP TABLE IF EXISTS `teams`;
CREATE TABLE `teams` (
  `id` int(155) NOT NULL,
  `title` varchar(555) NOT NULL,
  `telegram_group_id` int(15) DEFAULT NULL,
  `created_by` int(155) DEFAULT NULL COMMENT 'admin''s id',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `team_admin`
--

DROP TABLE IF EXISTS `team_admin`;
CREATE TABLE `team_admin` (
  `id` int(11) NOT NULL,
  `team_id` int(11) NOT NULL,
  `admin_id` int(11) NOT NULL,
  `created_by` int(11) DEFAULT NULL COMMENT 'admin id',
  `timestamp` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_bot`
--

DROP TABLE IF EXISTS `telegram_bot`;
CREATE TABLE `telegram_bot` (
  `tb_id` int(155) NOT NULL,
  `tb_chat_id` varchar(155) NOT NULL,
  `tb_action` varchar(255) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_cache`
--

DROP TABLE IF EXISTS `telegram_cache`;
CREATE TABLE `telegram_cache` (
  `tc_id` int(155) NOT NULL,
  `tc_chat_id` varchar(155) DEFAULT NULL,
  `tc_row` int(2) DEFAULT NULL,
  `tc_cache` varchar(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_groups`
--

DROP TABLE IF EXISTS `telegram_groups`;
CREATE TABLE `telegram_groups` (
  `tgg_id` int(155) NOT NULL,
  `guest_chat_id` varchar(55) NOT NULL,
  `group_chat_id` varchar(55) NOT NULL,
  `group_title` varchar(55) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_reply`
--

DROP TABLE IF EXISTS `telegram_reply`;
CREATE TABLE `telegram_reply` (
  `tr_id` int(155) NOT NULL,
  `tr_question` varchar(255) NOT NULL,
  `tr_reply` varchar(255) DEFAULT NULL,
  `tr_keyboard` varchar(555) DEFAULT NULL,
  `tr_next` int(155) DEFAULT NULL,
  `tr_session` varchar(15) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_responses`
--

DROP TABLE IF EXISTS `telegram_responses`;
CREATE TABLE `telegram_responses` (
  `tr_id` int(155) NOT NULL,
  `tr_question` varchar(555) DEFAULT NULL,
  `tr_response` varchar(555) DEFAULT NULL,
  `tr_keyboard` varchar(555) NOT NULL,
  `tr_keyboard_status` int(1) NOT NULL DEFAULT 0,
  `tr_chat_id` int(15) DEFAULT NULL,
  `tr_status` int(1) NOT NULL DEFAULT 0,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `telegram_session`
--

DROP TABLE IF EXISTS `telegram_session`;
CREATE TABLE `telegram_session` (
  `ts_id` int(255) NOT NULL,
  `ts_note` varchar(255) DEFAULT NULL,
  `ts_action` varchar(255) DEFAULT NULL,
  `ts_session` varchar(255) DEFAULT NULL,
  `ts_chat_id` varchar(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `urlshortener`
--

DROP TABLE IF EXISTS `urlshortener`;
CREATE TABLE `urlshortener` (
  `us_id` int(155) NOT NULL,
  `us_url` varchar(500) NOT NULL,
  `us_keyword` varchar(250) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

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

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `u_id` int(255) NOT NULL,
  `u_fullname` varchar(255) NOT NULL,
  `u_icno` int(14) DEFAULT NULL,
  `u_gender` int(1) DEFAULT NULL,
  `u_contact` varchar(15) DEFAULT NULL,
  `u_email` varchar(25) DEFAULT NULL,
  `u_status` int(2) DEFAULT 0,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `user_staff`
--

DROP TABLE IF EXISTS `user_staff`;
CREATE TABLE `user_staff` (
  `us_id` int(115) NOT NULL,
  `u_id` int(115) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `utilities`
--

DROP TABLE IF EXISTS `utilities`;
CREATE TABLE `utilities` (
  `u_id` int(155) NOT NULL,
  `u_type_id` int(5) NOT NULL,
  `u_date` date DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `u_amount` decimal(7,2) DEFAULT NULL,
  `u_note` varchar(500) NOT NULL,
  `u_paid_by` int(1) DEFAULT NULL COMMENT 'by owner 1 or host 2',
  `u_paid_at` datetime DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `utility_log`
--

DROP TABLE IF EXISTS `utility_log`;
CREATE TABLE `utility_log` (
  `utyl_id` int(155) NOT NULL,
  `uty_id` int(155) DEFAULT NULL,
  `r_id` int(155) DEFAULT NULL,
  `utyt_id` int(155) DEFAULT NULL,
  `utyl_report` varchar(555) DEFAULT NULL,
  `a_id` int(155) DEFAULT NULL,
  `utyl_ip_address` varchar(55) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `utility_payment`
--

DROP TABLE IF EXISTS `utility_payment`;
CREATE TABLE `utility_payment` (
  `utyp_id` int(155) NOT NULL,
  `uty_id` int(155) NOT NULL,
  `utyp_amount` decimal(7,2) NOT NULL,
  `utyp_date` date NOT NULL,
  `utyp_method` int(1) NOT NULL DEFAULT 0,
  `utyp_status` int(1) NOT NULL DEFAULT 0,
  `utyp_note` varchar(555) DEFAULT NULL,
  `utyp_file` varchar(555) DEFAULT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `utility_type`
--

DROP TABLE IF EXISTS `utility_type`;
CREATE TABLE `utility_type` (
  `uty_id` int(155) NOT NULL,
  `uty_title` varchar(255) NOT NULL,
  `a_id` int(155) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `wifi_redirections`
--

DROP TABLE IF EXISTS `wifi_redirections`;
CREATE TABLE `wifi_redirections` (
  `wr_id` int(11) NOT NULL,
  `code` varchar(155) NOT NULL,
  `url` varchar(255) NOT NULL,
  `tg_chat_id` varchar(55) NOT NULL,
  `room` varchar(155) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `actions`
--
ALTER TABLE `actions`
  ADD PRIMARY KEY (`act_id`);

--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
  ADD PRIMARY KEY (`a_id`);

--
-- Indexes for table `app_notification`
--
ALTER TABLE `app_notification`
  ADD PRIMARY KEY (`an_id`);

--
-- Indexes for table `bill_type`
--
ALTER TABLE `bill_type`
  ADD PRIMARY KEY (`bl_id`);

--
-- Indexes for table `chats`
--
ALTER TABLE `chats`
  ADD PRIMARY KEY (`chat_id`);

--
-- Indexes for table `claims`
--
ALTER TABLE `claims`
  ADD PRIMARY KEY (`c_id`);

--
-- Indexes for table `clean`
--
ALTER TABLE `clean`
  ADD PRIMARY KEY (`c_id`);

--
-- Indexes for table `communication_control`
--
ALTER TABLE `communication_control`
  ADD PRIMARY KEY (`cc_id`);

--
-- Indexes for table `communication_materials`
--
ALTER TABLE `communication_materials`
  ADD PRIMARY KEY (`cm_id`);

--
-- Indexes for table `damage_reports`
--
ALTER TABLE `damage_reports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deposit`
--
ALTER TABLE `deposit`
  ADD PRIMARY KEY (`dp_id`);

--
-- Indexes for table `deposit_log`
--
ALTER TABLE `deposit_log`
  ADD PRIMARY KEY (`dpl_id`);

--
-- Indexes for table `earning`
--
ALTER TABLE `earning`
  ADD PRIMARY KEY (`e_id`);

--
-- Indexes for table `email_activity`
--
ALTER TABLE `email_activity`
  ADD PRIMARY KEY (`ea_id`);

--
-- Indexes for table `ep_apartments`
--
ALTER TABLE `ep_apartments`
  ADD PRIMARY KEY (`apt_id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`exp_id`);

--
-- Indexes for table `expenses_log`
--
ALTER TABLE `expenses_log`
  ADD PRIMARY KEY (`exl_id`);

--
-- Indexes for table `expenses_type`
--
ALTER TABLE `expenses_type`
  ADD PRIMARY KEY (`et_id`);

--
-- Indexes for table `guest`
--
ALTER TABLE `guest`
  ADD PRIMARY KEY (`g_id`);

--
-- Indexes for table `housekeep`
--
ALTER TABLE `housekeep`
  ADD PRIMARY KEY (`hk_id`);

--
-- Indexes for table `housekeep_admin`
--
ALTER TABLE `housekeep_admin`
  ADD PRIMARY KEY (`ha_id`);

--
-- Indexes for table `housekeep_staff`
--
ALTER TABLE `housekeep_staff`
  ADD PRIMARY KEY (`hks_id`);

--
-- Indexes for table `inventories`
--
ALTER TABLE `inventories`
  ADD PRIMARY KEY (`iv_id`);

--
-- Indexes for table `items`
--
ALTER TABLE `items`
  ADD PRIMARY KEY (`i_id`);

--
-- Indexes for table `key_handover`
--
ALTER TABLE `key_handover`
  ADD PRIMARY KEY (`kh_id`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`lg_id`);

--
-- Indexes for table `owners`
--
ALTER TABLE `owners`
  ADD PRIMARY KEY (`o_id`);

--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
  ADD PRIMARY KEY (`py_id`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`py_id`);

--
-- Indexes for table `platforms`
--
ALTER TABLE `platforms`
  ADD PRIMARY KEY (`pt_id`);

--
-- Indexes for table `platform_income`
--
ALTER TABLE `platform_income`
  ADD PRIMARY KEY (`pi_id`);

--
-- Indexes for table `properties`
--
ALTER TABLE `properties`
  ADD PRIMARY KEY (`pty_id`);

--
-- Indexes for table `property`
--
ALTER TABLE `property`
  ADD PRIMARY KEY (`pro_id`);

--
-- Indexes for table `property_admin`
--
ALTER TABLE `property_admin`
  ADD PRIMARY KEY (`pa_id`);

--
-- Indexes for table `reservation`
--
ALTER TABLE `reservation`
  ADD PRIMARY KEY (`rv_id`);

--
-- Indexes for table `reservation_log`
--
ALTER TABLE `reservation_log`
  ADD PRIMARY KEY (`rl_id`);

--
-- Indexes for table `reservation_payment`
--
ALTER TABLE `reservation_payment`
  ADD PRIMARY KEY (`rvp_id`);

--
-- Indexes for table `reservation_payment_log`
--
ALTER TABLE `reservation_payment_log`
  ADD PRIMARY KEY (`rvpl_id`);

--
-- Indexes for table `reservation_telegram`
--
ALTER TABLE `reservation_telegram`
  ADD PRIMARY KEY (`rt_id`);

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

--
-- Indexes for table `room`
--
ALTER TABLE `room`
  ADD PRIMARY KEY (`r_id`);

--
-- Indexes for table `rooms`
--
ALTER TABLE `rooms`
  ADD PRIMARY KEY (`r_id`);

--
-- Indexes for table `room_admin`
--
ALTER TABLE `room_admin`
  ADD PRIMARY KEY (`ra_id`);

--
-- Indexes for table `room_bill`
--
ALTER TABLE `room_bill`
  ADD PRIMARY KEY (`rb_id`);

--
-- Indexes for table `room_cards`
--
ALTER TABLE `room_cards`
  ADD PRIMARY KEY (`rc_id`);

--
-- Indexes for table `room_expenses`
--
ALTER TABLE `room_expenses`
  ADD PRIMARY KEY (`re_id`);

--
-- Indexes for table `room_housekeeper`
--
ALTER TABLE `room_housekeeper`
  ADD PRIMARY KEY (`rh_id`);

--
-- Indexes for table `room_inventory`
--
ALTER TABLE `room_inventory`
  ADD PRIMARY KEY (`ri_id`);

--
-- Indexes for table `room_item`
--
ALTER TABLE `room_item`
  ADD PRIMARY KEY (`ri_id`);

--
-- Indexes for table `room_maintenance`
--
ALTER TABLE `room_maintenance`
  ADD PRIMARY KEY (`rm_id`);

--
-- Indexes for table `room_report`
--
ALTER TABLE `room_report`
  ADD PRIMARY KEY (`rr_id`);

--
-- Indexes for table `room_type`
--
ALTER TABLE `room_type`
  ADD PRIMARY KEY (`rt_id`);

--
-- Indexes for table `room_utility`
--
ALTER TABLE `room_utility`
  ADD PRIMARY KEY (`ru_id`);

--
-- Indexes for table `router_apartment`
--
ALTER TABLE `router_apartment`
  ADD PRIMARY KEY (`ra_id`);

--
-- Indexes for table `salary_payment`
--
ALTER TABLE `salary_payment`
  ADD PRIMARY KEY (`sp_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`s_id`);

--
-- Indexes for table `sms_activity`
--
ALTER TABLE `sms_activity`
  ADD PRIMARY KEY (`sa_id`);

--
-- Indexes for table `staffs`
--
ALTER TABLE `staffs`
  ADD PRIMARY KEY (`s_id`);

--
-- Indexes for table `staff_salary`
--
ALTER TABLE `staff_salary`
  ADD PRIMARY KEY (`ss_id`);

--
-- Indexes for table `stocks`
--
ALTER TABLE `stocks`
  ADD PRIMARY KEY (`s_id`);

--
-- Indexes for table `teams`
--
ALTER TABLE `teams`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `team_admin`
--
ALTER TABLE `team_admin`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `telegram_bot`
--
ALTER TABLE `telegram_bot`
  ADD PRIMARY KEY (`tb_id`);

--
-- Indexes for table `telegram_cache`
--
ALTER TABLE `telegram_cache`
  ADD PRIMARY KEY (`tc_id`);

--
-- Indexes for table `telegram_groups`
--
ALTER TABLE `telegram_groups`
  ADD PRIMARY KEY (`tgg_id`);

--
-- Indexes for table `telegram_reply`
--
ALTER TABLE `telegram_reply`
  ADD PRIMARY KEY (`tr_id`);

--
-- Indexes for table `telegram_responses`
--
ALTER TABLE `telegram_responses`
  ADD PRIMARY KEY (`tr_id`);

--
-- Indexes for table `telegram_session`
--
ALTER TABLE `telegram_session`
  ADD PRIMARY KEY (`ts_id`);

--
-- Indexes for table `urlshortener`
--
ALTER TABLE `urlshortener`
  ADD PRIMARY KEY (`us_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`u_id`);

--
-- Indexes for table `user_staff`
--
ALTER TABLE `user_staff`
  ADD PRIMARY KEY (`us_id`);

--
-- Indexes for table `utilities`
--
ALTER TABLE `utilities`
  ADD PRIMARY KEY (`u_id`);

--
-- Indexes for table `utility_log`
--
ALTER TABLE `utility_log`
  ADD PRIMARY KEY (`utyl_id`);

--
-- Indexes for table `utility_payment`
--
ALTER TABLE `utility_payment`
  ADD PRIMARY KEY (`utyp_id`);

--
-- Indexes for table `utility_type`
--
ALTER TABLE `utility_type`
  ADD PRIMARY KEY (`uty_id`);

--
-- Indexes for table `wifi_redirections`
--
ALTER TABLE `wifi_redirections`
  ADD PRIMARY KEY (`wr_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `actions`
--
ALTER TABLE `actions`
  MODIFY `act_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `a_id` int(4) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `app_notification`
--
ALTER TABLE `app_notification`
  MODIFY `an_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bill_type`
--
ALTER TABLE `bill_type`
  MODIFY `bl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chats`
--
ALTER TABLE `chats`
  MODIFY `chat_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `claims`
--
ALTER TABLE `claims`
  MODIFY `c_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `clean`
--
ALTER TABLE `clean`
  MODIFY `c_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communication_control`
--
ALTER TABLE `communication_control`
  MODIFY `cc_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communication_materials`
--
ALTER TABLE `communication_materials`
  MODIFY `cm_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `damage_reports`
--
ALTER TABLE `damage_reports`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deposit`
--
ALTER TABLE `deposit`
  MODIFY `dp_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deposit_log`
--
ALTER TABLE `deposit_log`
  MODIFY `dpl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `earning`
--
ALTER TABLE `earning`
  MODIFY `e_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `email_activity`
--
ALTER TABLE `email_activity`
  MODIFY `ea_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ep_apartments`
--
ALTER TABLE `ep_apartments`
  MODIFY `apt_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `exp_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses_log`
--
ALTER TABLE `expenses_log`
  MODIFY `exl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses_type`
--
ALTER TABLE `expenses_type`
  MODIFY `et_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `guest`
--
ALTER TABLE `guest`
  MODIFY `g_id` int(4) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `housekeep`
--
ALTER TABLE `housekeep`
  MODIFY `hk_id` int(115) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `housekeep_admin`
--
ALTER TABLE `housekeep_admin`
  MODIFY `ha_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `housekeep_staff`
--
ALTER TABLE `housekeep_staff`
  MODIFY `hks_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inventories`
--
ALTER TABLE `inventories`
  MODIFY `iv_id` int(115) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
  MODIFY `i_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `key_handover`
--
ALTER TABLE `key_handover`
  MODIFY `kh_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `logs`
--
ALTER TABLE `logs`
  MODIFY `lg_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `owners`
--
ALTER TABLE `owners`
  MODIFY `o_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
  MODIFY `py_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `py_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `platforms`
--
ALTER TABLE `platforms`
  MODIFY `pt_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `platform_income`
--
ALTER TABLE `platform_income`
  MODIFY `pi_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `properties`
--
ALTER TABLE `properties`
  MODIFY `pty_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `property`
--
ALTER TABLE `property`
  MODIFY `pro_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `property_admin`
--
ALTER TABLE `property_admin`
  MODIFY `pa_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reservation`
--
ALTER TABLE `reservation`
  MODIFY `rv_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reservation_log`
--
ALTER TABLE `reservation_log`
  MODIFY `rl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reservation_payment`
--
ALTER TABLE `reservation_payment`
  MODIFY `rvp_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reservation_payment_log`
--
ALTER TABLE `reservation_payment_log`
  MODIFY `rvpl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reservation_telegram`
--
ALTER TABLE `reservation_telegram`
  MODIFY `rt_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `re_id`
--
ALTER TABLE `re_id`
  MODIFY `re_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room`
--
ALTER TABLE `room`
  MODIFY `r_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rooms`
--
ALTER TABLE `rooms`
  MODIFY `r_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_admin`
--
ALTER TABLE `room_admin`
  MODIFY `ra_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_bill`
--
ALTER TABLE `room_bill`
  MODIFY `rb_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_cards`
--
ALTER TABLE `room_cards`
  MODIFY `rc_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_expenses`
--
ALTER TABLE `room_expenses`
  MODIFY `re_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_housekeeper`
--
ALTER TABLE `room_housekeeper`
  MODIFY `rh_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_inventory`
--
ALTER TABLE `room_inventory`
  MODIFY `ri_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_item`
--
ALTER TABLE `room_item`
  MODIFY `ri_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_maintenance`
--
ALTER TABLE `room_maintenance`
  MODIFY `rm_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_report`
--
ALTER TABLE `room_report`
  MODIFY `rr_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_type`
--
ALTER TABLE `room_type`
  MODIFY `rt_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `room_utility`
--
ALTER TABLE `room_utility`
  MODIFY `ru_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `router_apartment`
--
ALTER TABLE `router_apartment`
  MODIFY `ra_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salary_payment`
--
ALTER TABLE `salary_payment`
  MODIFY `sp_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sessions`
--
ALTER TABLE `sessions`
  MODIFY `s_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sms_activity`
--
ALTER TABLE `sms_activity`
  MODIFY `sa_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `staffs`
--
ALTER TABLE `staffs`
  MODIFY `s_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `staff_salary`
--
ALTER TABLE `staff_salary`
  MODIFY `ss_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stocks`
--
ALTER TABLE `stocks`
  MODIFY `s_id` int(115) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `teams`
--
ALTER TABLE `teams`
  MODIFY `id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `team_admin`
--
ALTER TABLE `team_admin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_bot`
--
ALTER TABLE `telegram_bot`
  MODIFY `tb_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_cache`
--
ALTER TABLE `telegram_cache`
  MODIFY `tc_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_groups`
--
ALTER TABLE `telegram_groups`
  MODIFY `tgg_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_reply`
--
ALTER TABLE `telegram_reply`
  MODIFY `tr_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_responses`
--
ALTER TABLE `telegram_responses`
  MODIFY `tr_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `telegram_session`
--
ALTER TABLE `telegram_session`
  MODIFY `ts_id` int(255) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `urlshortener`
--
ALTER TABLE `urlshortener`
  MODIFY `us_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `u_id` int(255) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_staff`
--
ALTER TABLE `user_staff`
  MODIFY `us_id` int(115) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utilities`
--
ALTER TABLE `utilities`
  MODIFY `u_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utility_log`
--
ALTER TABLE `utility_log`
  MODIFY `utyl_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utility_payment`
--
ALTER TABLE `utility_payment`
  MODIFY `utyp_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utility_type`
--
ALTER TABLE `utility_type`
  MODIFY `uty_id` int(155) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `wifi_redirections`
--
ALTER TABLE `wifi_redirections`
  MODIFY `wr_id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
