SQLize
Online
/
PHPize Online
/
SQLtest Online
A
A
A
Share
Donate
Blog
Popular
Donate
A
A
A
Share
Blog
Popular
SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code.
You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.
SQL code:
Upload
Copy
Format
Clear
-- phpMyAdmin SQL Dump -- version 5.2.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 07, 2025 at 09:39 AM -- Server version: 8.0.31 -- PHP Version: 8.2.0 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: `sweetvillaadmin` -- -- -------------------------------------------------------- -- -- Table structure for table `address` -- DROP TABLE IF EXISTS `address`; CREATE TABLE IF NOT EXISTS `address` ( `id` int NOT NULL AUTO_INCREMENT, `street` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `city` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `pincode` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL, `state` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `country` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `previous_address` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `present_address` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `admin_id` int DEFAULT NULL, `hostel_id` int DEFAULT NULL, `tenant_id` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`), KEY `hostel_id` (`hostel_id`), KEY `tenant_id` (`tenant_id`) ) ENGINE=MyISAM AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `address` -- INSERT INTO `address` (`id`, `street`, `city`, `pincode`, `state`, `country`, `previous_address`, `present_address`, `admin_id`, `hostel_id`, `tenant_id`, `created_at`, `updated_at`) VALUES (1, 'C- Block, C-45, Subhash Park, Block C, New Ashok Nagar', 'New Ashok Nagar', '110096', 'Delhi', 'INDIA', NULL, NULL, 1, NULL, NULL, '2024-10-18 07:35:14', '2024-10-18 16:05:50'), (9, 'Behind V3S Nirman Vihar ', 'Delhi', '1110096', 'Delhi', 'India', NULL, NULL, NULL, NULL, 3, '2024-11-07 08:23:17', '2024-11-12 14:38:26'), (5, 'C- Block, C-45, Subhash Park, Block C, New Ashok Nagar', 'New Ashok Nagar', '110096', 'Delhi', 'India', NULL, NULL, NULL, 1, NULL, '2024-10-18 08:00:05', '2024-10-18 16:05:44'), (7, 'Block D Ashok Nagar', 'New Ashok Nagar', '110096', 'Delhi', 'INDIA', 'Previous Address', 'Present Address', NULL, NULL, 1, '2024-10-19 13:31:03', '2024-11-21 11:15:52'), (8, 'New Delhi ', 'New Delhi', '110092', 'Delhi', 'India', NULL, NULL, NULL, NULL, 2, '2024-10-23 13:26:35', '2024-10-23 18:56:35'), (10, 'sdjfkd', 'sdgdfsg', '142536', 'Uttar Pradesh', 'India', NULL, NULL, NULL, 3, NULL, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (13, 'Deoria', 'Deoria', '274001', 'Uttar Pradesh', 'India', '', 'Delhi', NULL, NULL, 4, '2024-11-18 10:50:09', '2024-11-18 16:20:09'), (14, '3rd floor Laxminagar', 'Delhi', '110059', 'Delhi', 'India', 'utcujtf i giy', '165/5, Panit Chowk New Delhi', NULL, NULL, 5, '2024-11-18 12:48:48', '2024-11-18 18:18:48'), (15, 'Somewhere in India', 'Delhi', '13212', 'Uttar Pradesh', 'India', NULL, NULL, NULL, 4, NULL, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (16, 'aldskf', 'aldskfj', '4444444444', 'Andhra Pradesh', 'India', NULL, NULL, NULL, 5, NULL, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (17, 'lkskmfd,m ; ksdnmf.,s', 'laskdl', '0', 'Uttar Pradesh', 'India', NULL, NULL, NULL, 6, NULL, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (18, 'Permanent Address', 'Delhi', '110096', 'Delhi', 'India', 'Previous Address', 'Present Address', NULL, NULL, 6, '2024-11-26 10:06:07', '2024-11-26 15:36:07'), (19, 'Jawaharpuri Budaun UP', 'Budaun', '243601', 'Uttar Pradesh', 'India', '', 'C 45, New Ashok Nagar, Delhi 110096', NULL, NULL, 7, '2024-11-26 17:45:07', '2024-11-26 23:15:07'), (26, 'Permanent Address', 'Rohit city', '2475982', 'Delhi', 'india', 'Previous Address', 'present Address', NULL, NULL, 16, '2024-12-23 13:27:51', '2024-12-23 18:57:51'), (25, 'Permanent Address', 'city ', '415263', 'Delhi', 'India', 'Previous', 'Present Address', NULL, NULL, 15, '2024-12-23 13:14:00', '2024-12-23 18:44:00'), (24, 'Permanent Address', 'city ', '415263', 'Delhi', 'India', 'Previous', 'Present Address', NULL, NULL, 15, '2024-12-23 13:14:00', '2024-12-23 18:44:00'), (27, 'Permanent Address', 'Rohit city', '2475982', 'Delhi', 'india', 'Previous Address', 'present Address', NULL, NULL, 16, '2024-12-23 13:27:51', '2024-12-23 18:57:51'), (28, 'bnbjn', 'bnvbmnm nb', '32', 'Delhi', 'gjkhfdsb', 'hjgjbn', 'hgnmbnvhj', NULL, NULL, 17, '2024-12-23 13:49:06', '2024-12-23 19:19:06'), (30, 'sbdvnsdbnm', ' svnsm vn', '4834543', 'Delhi', 'sd vsnm ', 'nsdbvnbmn', 'sndbvjbsjb', NULL, NULL, 20, '2024-12-24 07:18:10', '2024-12-24 12:48:10'), (31, 'sdnbnmdbnm,', 'dfnbsmbgf,', '214651321', 'Delhi', 'sdbgjsb', 'sdgbnsbdnm', 'bsjdjnbsdj', NULL, NULL, 21, '2024-12-24 07:22:37', '2024-12-24 12:52:37'), (46, 'jdngjkdfjknekhn', 'jbngkdfjgndkj', '287975', 'Jharkhand', 'jgnekjghnwk', 'nmdbf,mdbgdhlskj', 'ngdn,m.bfedn', NULL, NULL, 36, '2024-12-24 12:00:38', '2024-12-24 17:30:38'), (45, 'njsbvjbwsjn', 'sfnbsjfbv', '8394786', 'Delhi', 'ndsbjbvsjm', 'nmsbnvbajk', 'nmsbdfjnm', NULL, NULL, 35, '2024-12-24 11:45:47', '2024-12-24 17:15:47'); -- -------------------------------------------------------- -- -- Table structure for table `admin` -- DROP TABLE IF EXISTS `admin`; CREATE TABLE IF NOT EXISTS `admin` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(70) COLLATE utf8mb4_general_ci DEFAULT NULL, `email` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `mobile` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL, `password` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id`, `name`, `email`, `mobile`, `password`, `created_at`, `updated_at`) VALUES (1, 'Admin', 'admin@admin.com', '9685741526', 'cGFzc3dvcmQ=', '2024-10-18 06:06:29', '2024-10-18 11:36:29'); -- -------------------------------------------------------- -- -- Table structure for table `bill_log` -- DROP TABLE IF EXISTS `bill_log`; CREATE TABLE IF NOT EXISTS `bill_log` ( `id` int NOT NULL AUTO_INCREMENT, `room_id` int DEFAULT NULL, `total_bill` decimal(10,2) DEFAULT NULL, `total_unit` int NOT NULL, `per_unit` int NOT NULL COMMENT 'per unit price', `tenant_id` int NOT NULL, `total_person` int NOT NULL, `status` enum('pending','paid') COLLATE utf8mb4_general_ci NOT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `individual_share` decimal(10,2) DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `bill_log` -- INSERT INTO `bill_log` (`id`, `room_id`, `total_bill`, `total_unit`, `per_unit`, `tenant_id`, `total_person`, `status`, `updated_at`, `individual_share`, `created_at`) VALUES (1, 9, '1200.00', 100, 12, 33, 2, 'pending', '2024-12-28 13:46:47', '230.00', '2024-12-28 11:56:38'), (2, 9, '1200.00', 100, 12, 32, 2, 'pending', '2024-12-28 13:46:47', '230.00', '2024-12-28 11:56:38'); -- -------------------------------------------------------- -- -- Table structure for table `electricity` -- DROP TABLE IF EXISTS `electricity`; CREATE TABLE IF NOT EXISTS `electricity` ( `id` int NOT NULL AUTO_INCREMENT, `room_id` int DEFAULT NULL, `current_reading` float DEFAULT NULL, `last_reading` float DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `room_id` (`room_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Table structure for table `electric_bill` -- DROP TABLE IF EXISTS `electric_bill`; CREATE TABLE IF NOT EXISTS `electric_bill` ( `id` int NOT NULL AUTO_INCREMENT, `month` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL, `hostel_id` int DEFAULT NULL, `tenant_id` int DEFAULT NULL, `total_unit` int DEFAULT NULL, `total_payment` float DEFAULT NULL, `receive_payment` float DEFAULT NULL, `pending_payment` float DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `electric_bill` -- INSERT INTO `electric_bill` (`id`, `month`, `hostel_id`, `tenant_id`, `total_unit`, `total_payment`, `receive_payment`, `pending_payment`, `created_at`, `updated_at`) VALUES (1, '2024-11', 1, 1, 30, 360, NULL, NULL, NULL, NULL), (2, '2024-11', 1, 2, 20, 240, NULL, NULL, NULL, NULL), (3, '2024-12', 1, 6, 250, 3000, NULL, NULL, NULL, NULL), (4, '2024-10', 1, 7, 200, 2400, NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `file` -- DROP TABLE IF EXISTS `file`; CREATE TABLE IF NOT EXISTS `file` ( `id` int NOT NULL AUTO_INCREMENT, `url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `fieldname` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL, `photo_url` varchar(100) COLLATE utf8mb4_general_ci NOT NULL, `photo` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL, `tenant_id` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `tenant_id` (`tenant_id`) ) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `file` -- INSERT INTO `file` (`id`, `url`, `fieldname`, `photo_url`, `photo`, `tenant_id`, `created_at`, `updated_at`) VALUES (1, '../uploded/doc/', 'doc-18112024051627.jpg', '../uploded/photo/', 'photo-12112024020420.JPG', 1, '2024-10-19 13:31:03', '2024-11-18 17:16:27'), (2, '../uploded/doc/', 'doc-18112024051550.jpg', '../uploded/photo/', 'photo-14112024010838.png', 2, '2024-10-23 13:26:35', '2024-11-18 17:15:50'), (3, '../uploded/doc/', 'doc-18112024051607.jpg', '../uploded/photo/', 'photo-12112024123558.jpg', 3, '2024-11-07 08:23:17', '2024-11-18 17:16:07'), (5, '../uploded/doc/', 'doc-18112024042009.jpg', '../uploded/photo/', 'pdf-18112024042009.jpg', 4, '2024-11-18 10:50:09', '2024-11-18 16:20:09'), (6, '../uploded/doc/', 'doc-18112024061848.jpg', '../uploded/photo/', 'pdf-18112024061848.jpg', 5, '2024-11-18 12:48:48', '2024-11-18 18:18:48'), (7, '../uploded/doc/', 'doc-26112024033607.jpg', '../uploded/photo/', 'pdf-26112024033607.png', 6, '2024-11-26 10:06:07', '2024-11-26 15:36:07'), (8, '../uploded/doc/', 'doc-28112024055848.jpg', '../uploded/photo/', 'pdf-26112024111507.jpg', 7, '2024-11-26 17:45:07', '2024-11-28 17:58:48'), (15, '../uploded/', 's25_1734960471.jpg', '../uploded/', 'se-2.jpg', 16, '2024-12-23 13:27:51', '2024-12-23 18:57:51'), (14, '../uploded/', 's19.jpg', '../uploded/', 's15.jpg', 15, '2024-12-23 13:14:00', '2024-12-23 18:44:00'), (13, '../uploded/', 's19.jpg', '../uploded/', 's15.jpg', 15, '2024-12-23 13:14:00', '2024-12-23 18:44:00'), (21, '../uploded/', 'se-2_1735024957.jpg', '../uploded/', 's15_1735024957.jpg', 21, '2024-12-24 07:22:37', '2024-12-24 12:52:37'), (17, '../uploded/', 'se-2_1734961746.jpg', '../uploded/', 'se-2_1734961746.jpg', 17, '2024-12-23 13:49:06', '2024-12-23 19:19:06'), (20, '../uploded/', 's17.jpg', '../uploded/', 's15_1735024690.jpg', 20, '2024-12-24 07:18:10', '2024-12-24 12:48:10'), (24, '../uploded/', 'se-2_1735031622.jpg', '../uploded/', 'se-2_1735031622.jpg', 24, '2024-12-24 09:13:42', '2024-12-24 14:43:42'), (25, '../uploded/', 's17_1735031919.jpg', '../uploded/', 'se-2_1735031919.jpg', 25, '2024-12-24 09:18:39', '2024-12-24 14:48:39'), (36, '../uploded/', 's18_1735041638.jpg', '../uploded/', 'se-2_1735041638.jpg', 36, '2024-12-24 12:00:38', '2024-12-24 17:30:38'); -- -------------------------------------------------------- -- -- Table structure for table `floor` -- DROP TABLE IF EXISTS `floor`; CREATE TABLE IF NOT EXISTS `floor` ( `id` int NOT NULL AUTO_INCREMENT, `floor_no` int DEFAULT NULL, `hostel_id` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `hostel_id` (`hostel_id`) ) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `floor` -- INSERT INTO `floor` (`id`, `floor_no`, `hostel_id`, `created_at`, `updated_at`) VALUES (1, 0, 1, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (2, 1, 1, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (3, 2, 1, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (4, 3, 1, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (6, 0, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (7, 1, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (8, 2, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (9, 3, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (10, 4, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (11, 5, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (12, 6, 3, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (13, 0, 4, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (14, 1, 4, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (15, 2, 4, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (16, 3, 4, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (17, 4, 4, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (18, 0, 5, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (19, 1, 5, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (20, 2, 5, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (21, 3, 5, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (22, 0, 6, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (23, 1, 6, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (24, 2, 6, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (25, 3, 6, '2024-11-21 09:04:13', '2024-11-21 14:34:13'); -- -------------------------------------------------------- -- -- Table structure for table `hostel` -- DROP TABLE IF EXISTS `hostel`; CREATE TABLE IF NOT EXISTS `hostel` ( `id` int NOT NULL AUTO_INCREMENT, `hostel_name` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL, `admin_id` int DEFAULT NULL, `electricity_price` float DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `hostel` -- INSERT INTO `hostel` (`id`, `hostel_name`, `admin_id`, `electricity_price`, `created_at`, `updated_at`) VALUES (1, 'Sweet Villa', 1, 12, '2024-10-18 08:00:05', '2024-12-20 16:38:53'), (3, 'Demo Hostel', 1, 5, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (4, 'My new hostel', 1, 7, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (5, 'sldkf', 1, 6, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (6, 'oiewfdpi1g', 1, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'); -- -------------------------------------------------------- -- -- Table structure for table `payment` -- DROP TABLE IF EXISTS `payment`; CREATE TABLE IF NOT EXISTS `payment` ( `id` int NOT NULL AUTO_INCREMENT, `method` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'cash or online', `electricity_bill` float DEFAULT NULL, `status` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Pending, paid, partialy_paid', `grand_total` float DEFAULT NULL, `payment_date` date DEFAULT NULL, `remark` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL, `tenant_id` int DEFAULT NULL, `payment_for` date DEFAULT NULL, `room_id` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `room_id` (`room_id`), KEY `tenant_id` (`tenant_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -------------------------------------------------------- -- -- Table structure for table `rent` -- DROP TABLE IF EXISTS `rent`; CREATE TABLE IF NOT EXISTS `rent` ( `id` int NOT NULL AUTO_INCREMENT, `hostel_id` int DEFAULT NULL, `tenant_id` int DEFAULT NULL, `rmonth` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL, `method` varchar(7) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Online, Cash', `tr_payment` float DEFAULT NULL, `rr_payment` float DEFAULT NULL, `pr_payment` float DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `rent` -- INSERT INTO `rent` (`id`, `hostel_id`, `tenant_id`, `rmonth`, `method`, `tr_payment`, `rr_payment`, `pr_payment`, `created_at`, `updated_at`) VALUES (1, 1, 2, '2024-11', NULL, 9500, 9500, 0, '2024-11-26 06:58:14', '2024-11-16 10:38:10'), (2, 1, 1, '2024-11', NULL, 7500, 7500, 0, '2024-11-21 05:31:33', '0000-00-00 00:00:00'), (3, 1, 6, '2024-12', NULL, 15000, 15000, 0, '2024-11-26 10:07:53', '0000-00-00 00:00:00'), (4, 1, 7, '2024-10', NULL, 10000, 7000, 3000, '2024-11-28 12:31:28', '0000-00-00 00:00:00'); -- -------------------------------------------------------- -- -- Table structure for table `room` -- DROP TABLE IF EXISTS `room`; CREATE TABLE IF NOT EXISTS `room` ( `id` int NOT NULL AUTO_INCREMENT, `room_no` varchar(5) COLLATE utf8mb4_general_ci DEFAULT NULL, `bed` int DEFAULT NULL, `occupied_bed` int NOT NULL, `tenant_allowed` int NOT NULL, `tenant_id` int DEFAULT NULL, `is_full` tinyint(1) NOT NULL, `rent` int DEFAULT NULL, `floor_id` int DEFAULT NULL, `hostel_id` int DEFAULT NULL, `current_reading` int NOT NULL, `last_reading` int NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `floor_id` (`floor_id`) ) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `room` -- INSERT INTO `room` (`id`, `room_no`, `bed`, `occupied_bed`, `tenant_allowed`, `tenant_id`, `is_full`, `rent`, `floor_id`, `hostel_id`, `current_reading`, `last_reading`, `created_at`, `updated_at`) VALUES (1, '1', 2, 1, 0, NULL, 1, NULL, 1, 1, 0, 100, '2024-10-18 08:00:05', '2024-12-28 12:23:22'), (2, '2', 2, 1, 0, 4, 1, NULL, 1, 1, 150, 200, '2024-10-18 08:00:05', '2024-12-29 01:08:19'), (3, '3', 3, 0, 0, 6, 0, NULL, 1, 1, 0, 0, '2024-10-18 08:00:05', '2024-12-27 11:57:24'), (4, '4', 2, 2, 0, NULL, 1, NULL, 1, 1, 0, 0, '2024-10-18 08:00:05', '2024-12-04 23:29:28'), (5, '5', 2, 0, 0, NULL, 0, NULL, 1, 1, 0, 0, '2024-10-18 08:00:05', '2024-12-25 17:31:08'), (6, '6', 2, 2, 0, NULL, 1, NULL, 1, 1, 200, 249, '2024-10-18 08:00:05', '2024-12-24 12:33:45'), (7, '101', 2, 2, 0, NULL, 1, NULL, 2, 1, 0, 100, '2024-10-18 08:00:05', '2024-12-24 14:43:42'), (8, '102', 2, 2, 0, NULL, 1, NULL, 2, 1, 0, 0, '2024-10-18 08:00:05', '2024-12-24 14:48:39'), (9, '103', 3, 2, 0, NULL, 0, NULL, 2, 1, 1000, 1050, '2024-10-18 08:00:05', '2024-12-25 16:18:03'), (10, '104', 2, 0, 0, NULL, 0, NULL, 2, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (11, '105', 2, 0, 0, NULL, 0, NULL, 2, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (12, '106', 2, 0, 0, NULL, 0, NULL, 2, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (13, '201', 2, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (14, '202', 2, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (15, '203', 3, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (16, '204', 2, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (17, '205', 2, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (18, '206', 2, 0, 0, NULL, 0, NULL, 3, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (19, '301', 2, 0, 0, NULL, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (20, '302', 2, 0, 0, NULL, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (21, '303', 3, 0, 0, 7, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-12-24 15:33:40'), (22, '304', 2, 0, 0, NULL, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (23, '305', 2, 0, 0, NULL, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (24, '306', 2, 0, 0, NULL, 0, NULL, 4, 1, 0, 0, '2024-10-18 08:00:05', '2024-10-18 13:30:05'), (26, '2', 2, 0, 0, NULL, 0, NULL, 5, 2, 0, 0, '2024-10-19 08:14:50', '2024-10-19 13:44:50'), (27, '3', 3, 0, 0, NULL, 0, NULL, 5, 2, 0, 0, '2024-10-19 08:14:50', '2024-10-19 13:44:50'), (28, '4', 2, 0, 0, NULL, 0, NULL, 5, 2, 0, 0, '2024-10-19 08:14:50', '2024-10-19 13:44:50'), (29, '5', 2, 0, 0, NULL, 0, NULL, 5, 2, 0, 0, '2024-10-19 08:14:50', '2024-10-19 13:44:50'), (30, '6', 2, 0, 0, NULL, 0, NULL, 5, 2, 0, 0, '2024-10-19 08:14:50', '2024-10-19 13:44:50'), (31, '1', 2, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (32, '2', 2, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (33, '3', 3, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (34, '4', 2, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (35, '5', 2, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (36, '6', 2, 0, 0, NULL, 0, NULL, 6, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (37, '101', 2, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (38, '102', 2, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (39, '103', 3, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (40, '104', 2, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (41, '105', 2, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (42, '106', 2, 0, 0, NULL, 0, NULL, 7, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (43, '201', 2, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (44, '202', 2, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (45, '203', 3, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (46, '204', 2, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (47, '205', 2, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (48, '206', 2, 0, 0, NULL, 0, NULL, 8, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (49, '301', 2, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (50, '302', 2, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (51, '303', 3, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (52, '304', 2, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (53, '305', 2, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (54, '306', 2, 0, 0, NULL, 0, NULL, 9, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (55, '401', 2, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (56, '402', 2, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (57, '403', 3, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (58, '404', 2, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (59, '405', 2, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (60, '406', 2, 0, 0, NULL, 0, NULL, 10, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (61, '501', 2, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (62, '502', 2, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (63, '503', 3, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (64, '504', 2, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (65, '505', 2, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (66, '506', 2, 0, 0, NULL, 0, NULL, 11, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (67, '601', 2, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (68, '602', 2, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (69, '603', 3, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (70, '604', 2, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (71, '605', 2, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (72, '606', 2, 0, 0, NULL, 0, NULL, 12, 3, 0, 0, '2024-11-12 16:55:29', '2024-11-12 22:25:29'), (73, '1', 2, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (74, '2', 2, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (75, '3', 3, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (76, '4', 2, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (77, '5', 2, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (78, '6', 2, 0, 0, NULL, 0, NULL, 13, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (79, '101', 2, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (80, '102', 2, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (81, '103', 3, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (82, '104', 2, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (83, '105', 2, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (84, '106', 2, 0, 0, NULL, 0, NULL, 14, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (85, '201', 2, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (86, '202', 2, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (87, '203', 3, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (88, '204', 2, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (89, '205', 2, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (90, '206', 2, 0, 0, NULL, 0, NULL, 15, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (91, '301', 2, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (92, '302', 2, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (93, '303', 3, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (94, '304', 2, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (95, '305', 2, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (96, '306', 2, 0, 0, NULL, 0, NULL, 16, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (97, '401', 2, 0, 0, NULL, 0, NULL, 17, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (98, '402', 2, 0, 0, NULL, 0, NULL, 17, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (99, '403', 3, 0, 0, NULL, 0, NULL, 17, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (100, '404', 2, 0, 0, NULL, 0, NULL, 17, 4, 200, 7, '2024-11-21 08:50:32', '2024-12-24 14:43:42'), (101, '405', 2, 0, 0, NULL, 0, NULL, 17, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (102, '406', 2, 0, 0, NULL, 0, NULL, 17, 4, 0, 0, '2024-11-21 08:50:32', '2024-11-21 14:20:32'), (103, '1', 2, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (104, '2', 2, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (105, '3', 3, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (106, '4', 2, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (107, '5', 2, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (108, '6', 2, 0, 0, NULL, 0, NULL, 18, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (109, '101', 2, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (110, '102', 2, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (111, '103', 3, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (112, '104', 2, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (113, '105', 2, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (114, '106', 2, 0, 0, NULL, 0, NULL, 19, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (115, '201', 2, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (116, '202', 2, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (117, '203', 3, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (118, '204', 2, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (119, '205', 2, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (120, '206', 2, 0, 0, NULL, 0, NULL, 20, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (121, '301', 2, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (122, '302', 2, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (123, '303', 3, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (124, '304', 2, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (125, '305', 2, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (126, '306', 2, 0, 0, NULL, 0, NULL, 21, 5, 0, 0, '2024-11-21 08:54:36', '2024-11-21 14:24:36'), (127, '1', 2, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (128, '2', 2, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (129, '3', 3, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (130, '4', 2, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (131, '5', 2, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (132, '6', 2, 0, 0, NULL, 0, NULL, 22, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (133, '101', 2, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (134, '102', 2, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (135, '103', 3, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (136, '104', 2, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (137, '105', 2, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (138, '106', 2, 0, 0, NULL, 0, NULL, 23, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (139, '201', 2, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (140, '202', 2, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (141, '203', 3, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (142, '204', 2, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (143, '205', 2, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (144, '206', 2, 0, 0, NULL, 0, NULL, 24, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (145, '301', 2, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (146, '302', 2, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (147, '303', 3, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (148, '304', 2, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (149, '305', 2, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'), (150, '306', 2, 0, 0, NULL, 0, NULL, 25, 6, 0, 0, '2024-11-21 09:04:13', '2024-11-21 14:34:13'); -- -------------------------------------------------------- -- -- Table structure for table `tenant` -- DROP TABLE IF EXISTS `tenant`; CREATE TABLE IF NOT EXISTS `tenant` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `mobile` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL, `family_name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `family_mobile` varchar(15) COLLATE utf8mb4_general_ci NOT NULL, `family_age` int NOT NULL, `family_relation` varchar(100) COLLATE utf8mb4_general_ci NOT NULL, `dob` date DEFAULT NULL, `age` int NOT NULL, `security_fee` float DEFAULT NULL, `rent_amount` int NOT NULL, `food_amount` int NOT NULL, `total_amount` int NOT NULL, `adhar_no` varchar(12) COLLATE utf8mb4_general_ci DEFAULT NULL, `occupation` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL, `occupation_office_details` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, `occupation_office_mobile` varchar(15) COLLATE utf8mb4_general_ci NOT NULL, `shift_date` date DEFAULT NULL, `unshift_date` date DEFAULT NULL, `unshift_status` int NOT NULL COMMENT '0. not Checkout\r\n1. checkout', `room_id` int DEFAULT NULL, `room_sharing_status` int NOT NULL COMMENT '1. Single Sharing\r\n\r\n2. Double Sharing\r\n3. triple Sharing', `hostel_id` int NOT NULL, `declaration` int NOT NULL COMMENT '1. Accepted', `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `tenant` -- INSERT INTO `tenant` (`id`, `name`, `mobile`, `family_name`, `family_mobile`, `family_age`, `family_relation`, `dob`, `age`, `security_fee`, `rent_amount`, `food_amount`, `total_amount`, `adhar_no`, `occupation`, `occupation_office_details`, `occupation_office_mobile`, `shift_date`, `unshift_date`, `unshift_status`, `room_id`, `room_sharing_status`, `hostel_id`, `declaration`, `status`, `created_at`, `updated_at`) VALUES (1, 'PRAD VISHWA', '9685741425', 'Vishwakarma', '9685741526', 24, 'friend', '2001-01-03', 23, 1000, 7500, 0, 7500, '635241748596', 'Job', 'It SEctor', '6352417485', '2024-10-20', '2024-11-26', 1, 4, 2, 1, 0, 'active', '2024-10-19 13:31:03', '2024-12-29 01:06:49'), (2, 'abhishek', '7485961425', 'Prajapati', '', 0, '', '2024-10-23', 0, 2000, 7500, 2000, 9500, '857496142536', 'Job', '', '', '2024-10-24', NULL, 0, 5, 2, 1, 0, 'active', '2024-10-23 13:26:35', '2024-12-29 01:06:57'), (3, 'yuvaraj kumar', '6352417896', 'Yuvaraj father', '', 0, '', '2024-11-07', 0, 3500, 15000, 0, 15000, '857496152635', 'Job', '', '', '2024-11-07', NULL, 0, 1, 1, 1, 0, 'active', '2024-11-07 08:23:17', '2024-12-29 01:07:32'), (4, 'Pradeep Vishwa', '9685741526', 'Prad Vishwa', '9685741526', 24, 'friend', '2000-02-29', 24, 5000, 15000, 0, 15000, '635241748596', 'Job', 'Vishwakarma Steel FACTORY, nOIDA', '8574961526', '2024-11-19', NULL, 0, 2, 1, 1, 1, 'active', '2024-11-18 10:50:09', '2024-12-29 01:07:38'), (5, 'Amarnath Rana', '07404664714', 'suresh rana', '07404664714', 67, 'hghgk', '1998-06-09', 0, 688768, 6000, 2000, 8000, '876876876876', 'Student', 'Building no. 80, office no. 201, vijay block,\r\njain uniform , near pillar no. 51, 52 laxmi nagar delhi 92', '07404664714', '2024-11-18', NULL, 0, 5, 1, 1, 1, 'active', '2024-11-18 12:48:48', '2024-12-29 01:07:43'), (6, 'Pradyumn', '859674152635', 'Prad Family', '7485961425', 25, 'Prad Friend', '2000-01-12', 24, 5000, 15000, 0, 15000, '362514475869', 'Job', 'Vishwakarma It Company', '9685741526', '2024-11-27', NULL, 0, 4, 2, 1, 1, 'active', '2024-11-26 10:06:07', '2024-12-29 01:07:48'), (7, 'Krishna', '9457830800', 'Ram naresh', '9411049024', 70, 'Father', '1994-06-06', 30, 3000, 6000, 4000, 10000, '599227092837', 'Job', 'Consultant \r\nHenry Harvin \r\nB12 sector 6 Noida ', '9953360305', '2024-07-03', NULL, 0, 21, 3, 1, 1, 'active', '2024-11-26 17:45:07', '2024-12-29 01:07:55'), (17, 'ndfjksd', '483978739', 'JSDHJFSD', '27345626728', 25, 'hgjgnbjnghj', '2024-11-04', 0, 348766000, 60000, 0, 60000, '375890238562', 'Job', 'ughjg', '67865', '2024-12-24', NULL, 0, 6, 2, 1, 1, 'active', '2024-12-23 13:49:06', '2024-12-25 12:56:32'), (15, 'Testing', '89497593', 'Testing Family Member', '548645343354624', 24, 'relation', '2001-06-13', 23, 3000, 5000, 0, 5000, '968574142536', 'Job', 'Office address ', '347587349058208', '2024-12-23', NULL, 0, 6, 2, 1, 1, 'active', '2024-12-23 13:14:00', '2024-12-25 12:56:35'), (20, 'kljkgd', '5478963797', 'dfsgnsbjb', '23478952', 34, 'sbsvdfnbvnm', '2013-01-25', 11, 20000, 2147483647, 3428793, 3428793, '837398567297', 'Job', 'dsnbnmsdb,vsnbmns', '430832759074', '2024-12-25', NULL, 0, NULL, 2, 1, 1, 'active', '2024-12-24 07:18:10', '2024-12-25 12:56:39'), (24, 'wrjklewrgjkwqg', '834503860935', 'mnsnmsbdnmw', '547893457958', 34, 'ensfdkdnbk', '2002-02-02', 22, 20000, 3000, 3, 3, '354894324654', 'Job', 'sdfkjksdngnsdkjfgh', '385798378973973', '2024-12-25', NULL, 0, 7, 2, 1, 1, 'active', '2024-12-24 09:13:42', '2024-12-25 12:56:44'), (22, 'lerkwhjsgjknsjknq', '823789127389', 'SBEHJAQJ', '235655366656', 32, 'nbfjwenjmqnj', '2000-02-02', 24, 32849200, 5378258, 872348, 872348, '324156432465', 'Job', 'nsgwekljngwkbj', '53465423486456', '2024-12-25', NULL, 0, 7, 2, 1, 1, 'active', '2024-12-24 07:33:20', '2024-12-25 12:56:49'), (25, 'sdjndsjnkj', '3737932834', 'sdfjkgnjsngjksnjks', '4356987337485', 23, 'dnmbvdnb mn', '2010-07-26', 14, 3475930000, 385793869, 0, 0, '124322315642', 'Job', 'jgrjgsdjkfnsjk', '843976537897387', '2024-12-25', NULL, 0, 8, 2, 1, 1, 'active', '2024-12-24 09:18:39', '2024-12-25 12:56:52'), (33, 'Rohit', '8253249', 'snbhjwghsjb', '92837568767', 23, 'sbgsbgs', '2003-04-05', 21, 2000, 5000, 0, 0, '327458923702', 'Job', 'jsbgskjgk', '382745902378523', '2024-12-26', NULL, 0, 9, 3, 1, 1, 'active', '2024-12-24 11:10:57', '2024-12-25 15:50:54'), (32, 'prad', '5874785282', 'sjhjdfkhj', '42375967328', 34, 'ndsfmsbm', '2001-02-02', 23, 28395800, 23847927, 9, 9, '253987508299', 'Job', 'sgkbjkbmsbnbk', '356389639691', '2024-12-04', NULL, 0, 9, 3, 1, 1, 'active', '2024-12-24 11:02:57', '2024-12-25 15:51:00'), (36, 'sngsnm ', '35752389752897', 'bdfkbgnmq', '3875893278092', 45, 'ndfnbdbfkdmq', '1989-03-08', 35, 4338390, 832873297, 89389, 89389, '832907568937', 'Job', 'jhgsjhgsk', '825782507294238', '2024-12-25', '2024-12-26', 1, 9, 3, 1, 1, 'inactive', '2024-12-24 12:00:38', '2024-12-25 16:18:03'); 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 */;
SQL
Server:
MariaDB 11.4
MariaDB 11.5
MariaDB 10
MariaDB 10 Sakila (ReadOnly)
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
SQLite 3
SQLite 3 Preloaded
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 11
PostgreSQL 12
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
MS SQL Server 2017
MS SQL Server 2019
MS SQL Server 2022
MS SQL Server 2022 AdventureWorks (ReadOnly)
Firebird 4.0
Firebird 4.0 (Employee)
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 23c Free
SOQOL
Version
ER Diagram
Preserve result
Stuck with a problem?
Got Error?
Ask ChatGPT!
Result:
Copy
Clear