text: -- phpMyAdmin SQL Dump
  -- version 4.8.5
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Apr 13, 2019 at 10:44 PM
  -- Server version: 10.1.38-MariaDB
  -- PHP Version: 7.1.27
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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: `std6102041520025`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `branch`
  --
  
  CREATE TABLE `branch` (
    `id` int(11) NOT NULL,
    `branch_no` varchar(5) DEFAULT NULL,
    `street` varchar(200) DEFAULT NULL,
    `city` varchar(200) DEFAULT NULL,
    `postcode` varchar(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `client`
  --
  
  CREATE TABLE `client` (
    `id` int(11) NOT NULL,
    `client_no` varchar(5) DEFAULT NULL,
    `frist_name` varchar(100) DEFAULT NULL,
    `last_name` varchar(100) DEFAULT NULL,
    `telephone` varchar(11) DEFAULT NULL,
    `pref_type` varchar(100) DEFAULT NULL,
    `mex_rent` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migration`
  --
  
  CREATE TABLE `migration` (
    `version` varchar(180) NOT NULL,
    `apply_time` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `migration`
  --
  
  INSERT INTO `migration` (`version`, `apply_time`) VALUES
  ('m000000_000000_base', 1555170410),
  ('m130524_201442_init', 1555170418),
  ('m190124_110200_add_verification_token_column_to_user_table', 1555170419),
  ('m190413_161642_create_branch_table', 1555173505),
  ('m190413_173233_create_registration_table', 1555177138),
  ('m190413_190844_create_viewing_table', 1555183232),
  ('m190413_194246_create_privateOwner_table', 1555184771),
  ('m190413_195047_create_client_table', 1555185267),
  ('m190413_195751_create_staff_table', 1555185639),
  ('m190413_200516_create_propertyForRent_table', 1555186103);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `privateowner`
  --
  
  CREATE TABLE `privateowner` (
    `id` int(11) NOT NULL,
    `owner_no` varchar(5) DEFAULT NULL,
    `frist_name` varchar(100) DEFAULT NULL,
    `last_name` varchar(100) DEFAULT NULL,
    `address` varchar(200) DEFAULT NULL,
    `telephone` varchar(11) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `propertyforrent`
  --
  
  CREATE TABLE `propertyforrent` (
    `id` int(11) NOT NULL,
    `property_no` varchar(5) DEFAULT NULL,
    `type` varchar(50) DEFAULT NULL,
    `room` int(11) DEFAULT NULL,
    `owner_id` int(11) DEFAULT NULL,
    `staff_id` int(11) DEFAULT NULL,
    `branch_id` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `registration`
  --
  
  CREATE TABLE `registration` (
    `id` int(11) NOT NULL,
    `client_id` int(11) DEFAULT NULL,
    `property_id` int(11) DEFAULT NULL,
    `date_joined` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `staff`
  --
  
  CREATE TABLE `staff` (
    `id` int(11) NOT NULL,
    `staff_no` varchar(5) DEFAULT NULL,
    `frist_name` varchar(100) DEFAULT NULL,
    `last_name` varchar(100) DEFAULT NULL,
    `position` varchar(50) DEFAULT NULL,
    `sex` varchar(3) DEFAULT NULL,
    `DOB` date DEFAULT NULL,
    `salary` int(11) DEFAULT NULL,
    `branch_id` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id` int(11) NOT NULL,
    `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
    `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `status` smallint(6) NOT NULL DEFAULT '10',
    `created_at` int(11) NOT NULL,
    `updated_at` int(11) NOT NULL,
    `verification_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `username`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `status`, `created_at`, `updated_at`, `verification_token`) VALUES
  (1, 'admin', 'jpOZUpP59C1tp1DV-AvcjE8MSAoraBUk', '$2y$13$7LkGUA3Caxy0LIWmTOdNP.ltpSry3TWQ8JPQ/eDvSofq8DwJc4nne', NULL, 'kungnwn@gmail.com', 10, 1555171042, 1555171042, 'qHin6nPszXNtQlO7Pa8Ozs5m9G461n3L_1555171042');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `viewing`
  --
  
  CREATE TABLE `viewing` (
    `id` int(11) NOT NULL,
    `client_id` int(11) DEFAULT NULL,
    `property_id` int(11) DEFAULT NULL,
    `view_date` date DEFAULT NULL,
    `comment` varchar(400) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `branch`
  --
  ALTER TABLE `branch`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `client`
  --
  ALTER TABLE `client`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migration`
  --
  ALTER TABLE `migration`
    ADD PRIMARY KEY (`version`);
  
  --
  -- Indexes for table `privateowner`
  --
  ALTER TABLE `privateowner`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `propertyforrent`
  --
  ALTER TABLE `propertyforrent`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `registration`
  --
  ALTER TABLE `registration`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `staff`
  --
  ALTER TABLE `staff`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `username` (`username`),
    ADD UNIQUE KEY `email` (`email`),
    ADD UNIQUE KEY `password_reset_token` (`password_reset_token`);
  
  --
  -- Indexes for table `viewing`
  --
  ALTER TABLE `viewing`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `branch`
  --
  ALTER TABLE `branch`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `client`
  --
  ALTER TABLE `client`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `privateowner`
  --
  ALTER TABLE `privateowner`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `propertyforrent`
  --
  ALTER TABLE `propertyforrent`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `registration`
  --
  ALTER TABLE `registration`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `staff`
  --
  ALTER TABLE `staff`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `viewing`
  --
  ALTER TABLE `viewing`
    MODIFY `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 */;
  