BBnepal-Accounts/bbnepal_hostel.sql

323 lines
8.8 KiB
MySQL
Raw Normal View History

2024-07-10 12:43:19 +00:00
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 27, 2023 at 03:01 AM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 8.1.12
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: `bbnepal_hostel`
--
-- --------------------------------------------------------
--
-- Table structure for table `hms_admin`
--
CREATE TABLE `hms_admin` (
`id` int(11) NOT NULL,
`admin_role_ids` varchar(255) NOT NULL,
`admin_name` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`status` varchar(64) NOT NULL DEFAULT 'Active',
`can_delete` varchar(16) NOT NULL DEFAULT 'Yes',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `hms_admin`
--
INSERT INTO `hms_admin` (`id`, `admin_role_ids`, `admin_name`, `email`, `password`, `status`, `can_delete`, `created`, `modified`) VALUES
(1, '1', 'Hostel Admin', 'hosteladmin@anything.com', '0e7517141fb53f21ee439b355b5a1d0a', 'Active', 'No', '2021-11-10 04:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `hms_admin_menu`
--
CREATE TABLE `hms_admin_menu` (
`id` int(11) NOT NULL,
`menu_name` varchar(256) NOT NULL,
`parent_id` int(11) NOT NULL DEFAULT 0,
`order_number` int(11) NOT NULL,
`inactive_icon` varchar(256) NOT NULL,
`active_icon` varchar(256) NOT NULL,
`page_link` varchar(256) NOT NULL,
`status` varchar(64) NOT NULL DEFAULT 'Active',
`created_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `hms_admin_menu`
--
INSERT INTO `hms_admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `page_link`, `status`, `created_on`) VALUES
(1, 'Dashboard', 0, 1, 'dashboard-1.svg', 'dashboard-2.svg', 'dashboard', 'Active', '2021-11-12 13:43:57'),
(2, 'Manage Rooms', 0, 2, 'room-1.svg', 'room-2.svg', 'blocks', 'Active', '2021-11-12 00:00:16'),
(5, 'Students', 0, 5, 'student-1.svg', 'student-2.svg', 'students', 'Active', '2021-11-12 00:00:00'),
(6, 'Authorization', 0, 6, 'subadmin1.png', 'subadmin2.png', '#', 'Active', '2021-11-12 00:00:00'),
(7, 'Roles', 6, 1, '', '', 'roles', 'Active', '2021-11-12 00:17:00'),
(8, 'Users', 6, 2, '', '', 'users', 'Active', '2021-11-12 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `hms_admin_roles`
--
CREATE TABLE `hms_admin_roles` (
`id` int(10) UNSIGNED NOT NULL,
`role_name` varchar(64) NOT NULL,
`role_desc` varchar(512) DEFAULT NULL,
`status` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
`can_delete` varchar(64) NOT NULL DEFAULT 'Yes',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `hms_admin_roles`
--
INSERT INTO `hms_admin_roles` (`id`, `role_name`, `role_desc`, `status`, `can_delete`, `created`, `modified`) VALUES
(1, 'Library Super Admin', NULL, 'Active', 'No', '2021-11-10 06:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `hms_admin_role_permissions`
--
CREATE TABLE `hms_admin_role_permissions` (
`id` int(10) UNSIGNED NOT NULL,
`admin_role_ids` int(11) NOT NULL,
`menu_ids` varchar(1024) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `hms_admin_role_permissions`
--
INSERT INTO `hms_admin_role_permissions` (`id`, `admin_role_ids`, `menu_ids`, `created`, `modified`) VALUES
(1, 1, '1,2,3,4,5,6', '2021-11-12 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `hms_beds`
--
CREATE TABLE `hms_beds` (
`id` int(11) NOT NULL,
`block_id` int(11) NOT NULL,
`floor_id` int(11) NOT NULL,
`room_id` int(11) NOT NULL,
`bed_name` varchar(100) NOT NULL,
`bed_status` varchar(20) NOT NULL DEFAULT 'vacant',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `hms_blocks`
--
CREATE TABLE `hms_blocks` (
`id` int(10) UNSIGNED NOT NULL,
`block_name` varchar(127) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
-- --------------------------------------------------------
--
-- Table structure for table `hms_floors`
--
CREATE TABLE `hms_floors` (
`id` int(10) UNSIGNED NOT NULL,
`block_id` int(11) NOT NULL,
`floor_name` varchar(127) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
-- --------------------------------------------------------
--
-- Table structure for table `hms_rooms`
--
CREATE TABLE `hms_rooms` (
`id` int(10) UNSIGNED NOT NULL,
`room_block_id` int(11) NOT NULL,
`room_floor_id` int(11) NOT NULL,
`room_name` varchar(127) NOT NULL,
`room_ac` varchar(10) DEFAULT 'NON-A/C',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
-- --------------------------------------------------------
--
-- Table structure for table `hms_students`
--
CREATE TABLE `hms_students` (
`id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`student_name` varchar(50) NOT NULL,
`block_id` int(11) NOT NULL,
`floor_id` int(11) NOT NULL,
`room_id` int(11) NOT NULL,
`bed_id` int(11) NOT NULL,
`food_type` varchar(20) DEFAULT NULL,
`joined_date` datetime NOT NULL DEFAULT current_timestamp(),
`exit_date` datetime DEFAULT NULL,
`modified` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `hms_admin`
--
ALTER TABLE `hms_admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_admin_menu`
--
ALTER TABLE `hms_admin_menu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_admin_roles`
--
ALTER TABLE `hms_admin_roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_admin_role_permissions`
--
ALTER TABLE `hms_admin_role_permissions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_beds`
--
ALTER TABLE `hms_beds`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_blocks`
--
ALTER TABLE `hms_blocks`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_floors`
--
ALTER TABLE `hms_floors`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_rooms`
--
ALTER TABLE `hms_rooms`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hms_students`
--
ALTER TABLE `hms_students`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `hms_admin`
--
ALTER TABLE `hms_admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `hms_admin_menu`
--
ALTER TABLE `hms_admin_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `hms_admin_roles`
--
ALTER TABLE `hms_admin_roles`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `hms_admin_role_permissions`
--
ALTER TABLE `hms_admin_role_permissions`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `hms_beds`
--
ALTER TABLE `hms_beds`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hms_blocks`
--
ALTER TABLE `hms_blocks`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hms_floors`
--
ALTER TABLE `hms_floors`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hms_rooms`
--
ALTER TABLE `hms_rooms`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hms_students`
--
ALTER TABLE `hms_students`
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 */;