-- Adminer 5.4.2 MySQL 8.0.46-0ubuntu0.24.04.3 dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';


CREATE TABLE `blacklisted_tokens` (
  `id` int NOT NULL AUTO_INCREMENT,
  `token` text NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `blacklisted_tokens` (`id`, `token`, `created_at`) VALUES
(1,	'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOGViZjliMmFjNWI2ZGMwOGMzNmI5NTNkNjc5Yzk1MzkiLCJlbWFpbCI6ImFiQGdtYWlsLmNvbSIsImV4cCI6MTc4OTQ2NjU0Mn0.HASDyM8LM5tURTHg_SapnkfXdsAmFo5qnVrkC5Ep09Q',	'2026-06-17 10:02:26'),
(2,	'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiYzU1MzUwMmUzMTIwZWY4ZDIzMGUzNTFkZTJkNDIxN2UiLCJlbWFpbCI6ImFiQGdtYWlsLmNvbSIsImV4cCI6MTc4OTQ2NjU5Mn0.Gz0KM8cML6A6aIzAXjh-2li6-lbB4BnT6Dh-kiDAr-A',	'2026-06-17 10:03:14'),
(3,	'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMjlkNjI5NmM5N2Q0ZGZhMTQyMzM2MTYyN2NhNWNlMWYiLCJlbWFpbCI6ImFiQGdtYWlsLmNvbSIsImV4cCI6MTc4OTQ2NzQ2OX0.Df6GtTorGV_BEg_KkEQQj5X-lyUDbtn_i_u001SCqvA',	'2026-06-17 10:17:52'),
(4,	'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZmFlMWUxYTk1OWVlZTRhMTgxYTkxMDIxMzdmZmQ4MDciLCJlbWFpbCI6ImFiQGdtYWlsLmNvbSIsImV4cCI6MTc4OTQ2ODgwMX0.3l49qRc6-o1K2n9Vp9Sz1K48FwgPL4XXekxrpxoy1bQ',	'2026-06-17 10:40:06'),
(5,	'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTk3NDNjOTY3YmY1MDYzY2EzOTEyZDk3NmUyYzExY2MiLCJlbWFpbCI6ImFiQGdtYWlsLmNvbSIsImV4cCI6MTc4OTQ2ODkxNX0.fjTuKHcHkJv6lf_hgwQ8bKpiTUPa8eSdzPDcSWopfvA',	'2026-06-17 10:45:56');

CREATE TABLE `bookings` (
  `id` char(36) NOT NULL,
  `owner_id` char(36) NOT NULL,
  `customer_id` char(36) DEFAULT NULL,
  `pricing_id` char(32) DEFAULT NULL,
  `pricing_label` varchar(255) DEFAULT NULL,
  `pricing_amount` decimal(10,2) DEFAULT '0.00',
  `table_id` char(36) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(50) DEFAULT NULL,
  `start_time` datetime NOT NULL,
  `duration_minutes` int NOT NULL,
  `grace_minutes` int DEFAULT '10',
  `status` enum('booked','completed','cancelled','expired') DEFAULT 'booked',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_bookings_owner` (`owner_id`),
  KEY `fk_bookings_table` (`table_id`),
  KEY `fk_booking_customer` (`customer_id`),
  CONSTRAINT `fk_booking_customer` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL,
  CONSTRAINT `fk_bookings_owner` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_bookings_table` FOREIGN KEY (`table_id`) REFERENCES `tables` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `bookings` (`id`, `owner_id`, `customer_id`, `pricing_id`, `pricing_label`, `pricing_amount`, `table_id`, `customer_name`, `customer_phone`, `start_time`, `duration_minutes`, `grace_minutes`, `status`, `created_at`) VALUES
('002d58e2fde7696046ac616281d41037',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00,	'764b2bb918e87eed54c1daf8f0d3ce5a',	'Maulik',	'9601603394',	'2026-07-06 11:28:00',	60,	10,	'completed',	'2026-07-06 05:59:07'),
('02e3dbab15912f5beef30021a145ac44',	'623dea88515a6339ffad62ef2febfe6f',	'726c05a7f1a031e819b77abc21fc46de',	'f2cd5fe9ebf90bd04425fc6034ad56a7',	'Hourly',	200.00,	'e137dd674bba676448791c03600e8bc9',	'Primary Cust A',	'1234567890',	'2026-07-04 12:17:01',	60,	10,	'completed',	'2026-07-04 12:07:01'),
('060e9f913deb9f51d3566a90c2bb6f73',	'67d3884ef2c65a0277342cb7219c0e17',	'97e95b519eac20322a57c1da17403804',	'286f5baca694606b6b3e015dc907c737',	'1 Hour',	160.00,	'b9a07490c4f5891dd84aeda1dae0d06c',	'Maulik',	'123',	'2026-05-29 21:47:00',	60,	10,	'completed',	'2026-05-29 16:17:47'),
('1809fb2ae875a8394877e316f80dbb17',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00,	'ceaa6e8b88b0fe56e157534a1871e649',	'Maulik',	'9601603394',	'2026-05-20 18:55:00',	60,	10,	'completed',	'2026-05-20 13:25:45'),
('1a1649011ab126660db96025bb6e9778',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00,	'764b2bb918e87eed54c1daf8f0d3ce5a',	'Maulik',	'9601603394',	'2026-07-07 15:14:00',	60,	10,	'completed',	'2026-07-07 09:45:02'),
('1d17f02a44003b03cbd7ea07c7b753c8',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00,	'764b2bb918e87eed54c1daf8f0d3ce5a',	'Maulik',	'9601603394',	'2026-07-06 12:43:00',	60,	10,	'completed',	'2026-07-06 07:14:21'),
('212b5c9d44e6f7cc8f7f6f37169cd5fc',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Suhas',	'123',	'2026-07-10 16:10:00',	60,	10,	'completed',	'2026-07-10 10:41:19'),
('2683f5667b64d609408730c263ccfc6f',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'9001518bffc99b62ea7ccf1948613e5e',	'Half Hour',	80.00,	'ceaa6e8b88b0fe56e157534a1871e649',	'Maulik',	'9601603394',	'2026-05-20 19:10:00',	30,	10,	'completed',	'2026-05-20 13:40:19'),
('2ad468d9c12b10d839dc18dc57e8d9c3',	'f79199f3bce6d22b6923babe4d1fbb7b',	'885269856f2cab3ee5f45421936bf05b',	'00b7bf6b31afa007939b1d00ef298c76',	'1 Frame',	120.00,	'e1e1e97848d407509e59dd9062d94b4e',	'Suhas',	'9173445963',	'2026-05-20 21:02:00',	60,	10,	'completed',	'2026-05-20 15:32:08'),
('332dd9ce60ee6d5ed9d79c47d1851c9b',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'286f5baca694606b6b3e015dc907c737',	'1 Hour',	160.00,	'b9a07490c4f5891dd84aeda1dae0d06c',	'Suhas',	'9173445963',	'2026-05-19 19:26:00',	60,	10,	'completed',	'2026-05-19 13:56:48'),
('3573757e83427282177b78c46169e83e',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Abc',	'123',	'2026-07-04 17:12:00',	60,	10,	'cancelled',	'2026-07-04 11:42:51'),
('3869c827d565c333d51c11f41f577b07',	'26addc76c9bbc8790175ae5913ed2da1',	'54aff68c2b4f0f34d0f44334d19a2760',	'c40ad2c2de62ca4090e260b3dbe53450',	'Hourly',	200.00,	'61716d2ee6d144ab742366b20e460bc6',	'Primary Cust A',	'1234567890',	'2026-07-04 12:34:59',	60,	10,	'booked',	'2026-07-04 12:24:59'),
('3e3fd5b21e1affa372dd23f7732aecc1',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00,	'ceaa6e8b88b0fe56e157534a1871e649',	'Suhas',	'9173445963',	'2026-05-20 19:44:00',	60,	10,	'completed',	'2026-05-20 14:14:11'),
('45ffc7a364e7e3370d02405be13b359b',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'2dbc3c2d809f16dd36e8303eaefcf967',	'9ef701cbf98b98c1e5435b6e05f8f7e4',	'1 Frame',	150.00,	'771aec17151d7acc930774236e34794a',	'Subas',	'961',	'2026-07-03 12:38:00',	60,	10,	'completed',	'2026-07-03 07:08:25'),
('473ca78ebee4aa7871fb5ab2d5422249',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Maulik',	'123',	'2026-07-03 17:32:00',	60,	10,	'completed',	'2026-07-03 12:02:21'),
('4a81b7b6d345532cfd01ef9504f0f39f',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'5f07c79fba16004e74b7d42973d5c437',	'Half Hour',	80.00,	'c0d25a696644cc9f10f886d0e442715c',	'Maulik',	'9601603394',	'2026-06-17 19:38:00',	30,	10,	'completed',	'2026-06-17 14:08:54'),
('4c3dfbd1f2cce470903e39d4c0bbb0c0',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'f077c24398dbeac6e090ef5749d453ab',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Maulik',	'79901 16847',	'2026-05-20 23:40:00',	60,	10,	'completed',	'2026-05-20 18:10:46'),
('54565cfd6b2f88905616c50363b4ccf0',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Suhas',	'9173445963',	'2026-05-20 19:18:00',	60,	10,	'completed',	'2026-05-20 13:49:09'),
('55203ce485c09335ae667e1226f8d056',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'3c470c7e8c8a5eaf67a33b5a76ef0a96',	'1 Frame',	120.00,	'631a3e33a1810e92143c852bae01d53b',	'Maulik',	'9601603394',	'2026-07-07 22:04:00',	60,	10,	'completed',	'2026-07-07 16:35:21'),
('6b3382aaed8e67ca065486d97dfd11c6',	'3d5d462baa28d208c661abc8ef1cc5bd',	'2a787612d25826d7dd1471494734c581',	'bb57ecebc067372b66b8765ed1124876',	'Hourly',	200.00,	'b2c2fadc24ad40694f87f4eeb6326c62',	'Primary Cust A',	'1234567890',	'2026-07-04 12:18:33',	60,	10,	'completed',	'2026-07-04 12:08:33'),
('6c16aa466a2a19794db0bc787fdb2282',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Suhas',	'9173445963',	'2026-05-20 23:27:00',	60,	10,	'completed',	'2026-05-20 17:57:59'),
('8282e927f61fa3889a51d14a5694a67d',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'00b7bf6b31afa007939b1d00ef298c76',	'1 Frame',	120.00,	'e1e1e97848d407509e59dd9062d94b4e',	'Ishan',	'9924935547',	'2026-05-20 21:09:00',	60,	10,	'completed',	'2026-05-20 15:39:26'),
('83e11f31da9ad5c7ca767f0318eb1924',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'27d7b1c9444eef3976125002c5421b14',	'1 Frame',	120.00,	'f4304c2ace2370637fc58db919bd2ee9',	'Suhas',	'9173445963',	'2026-05-19 19:28:00',	60,	10,	'completed',	'2026-05-19 14:00:05'),
('8fca7855eda662a416d1df5a9952c2bc',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Suhas',	'9173445963',	'2026-05-20 18:57:00',	60,	10,	'completed',	'2026-05-20 13:27:52'),
('94b25f4c27b92208f464ae52c2d0b4fc',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'ace541547a35a81084143d53fc86dbca',	'3bc8f975d8849cc27434f78ab5a58362',	'1 Hour',	150.00,	'1a3cb52383f6a8c5b860fa2f18b789e3',	'Abc',	'123',	'2026-05-20 19:20:00',	60,	10,	'completed',	'2026-05-20 13:50:30'),
('96fc2e7bed82c5548110cd14e65499ee',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'76f69074a4d6e6cdae2a954fc128f8ef',	'1 Hour',	150.00,	'1c85a37b5b4383eb43b80d877bde23d8',	'suhas',	'9173445963',	'2026-05-20 20:17:00',	60,	10,	'completed',	'2026-05-20 14:47:26'),
('9dcbbf2ccf7498016a9733f1adee63bd',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Abc',	'123',	'2026-07-03 17:19:00',	60,	10,	'completed',	'2026-07-03 11:49:32'),
('a1a517c1258dd8a55907853c13734689',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'b242ccb02b257c60756ea817a5f2585c',	'1 Frame',	120.00,	'25727fd1d957be0e8598d96e3dc94fdd',	'Ishan',	'9924935547',	'2026-05-20 21:11:00',	60,	10,	'completed',	'2026-05-20 15:41:15'),
('a2599ee22ad34289a230683299bb8738',	'80764fa7d3fad2a15e793e23adf503d8',	'91ab3949d02eabeb896ec299439622b3',	'975be1aaf1e031a80c9291ad1e45646f',	'Hourly',	200.00,	'6cab1c7e61e8e250b57475e4f6524b6d',	'Primary Cust A',	'1234567890',	'2026-07-04 12:17:19',	60,	10,	'completed',	'2026-07-04 12:07:19'),
('a37a22ef47fdf92def371321b623b642',	'42f9062a60cbfb0c55f1ea78e618a459',	'1d372c59d739fa58d8f220ac877c986c',	'ec8f0aa81d7fa9bb0d91318bc27c04e0',	'Hourly',	200.00,	'83f5ca5515284a0b89bbf98228ea2848',	'Primary Cust A',	'1234567890',	'2026-07-04 12:34:06',	60,	10,	'completed',	'2026-07-04 12:24:06'),
('a7c9a88b3d9675854617aad901af25d5',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Suhas',	'9173445963',	'2026-05-20 20:19:00',	60,	10,	'completed',	'2026-05-20 14:49:47'),
('a8691bdad88c7a161f324eae9c5cf4e1',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Abc',	'123',	'2026-07-03 17:07:00',	60,	10,	'cancelled',	'2026-07-03 11:38:09'),
('b7a65984de9069029ff3fd7dbedc8658',	'b7caca4e30079dd79663fdfc4fcf11b8',	'18d924c7c0db506a054e1be302a23a5f',	'63a423d11fb1eb0cc874b10a382709c2',	'Hourly',	200.00,	'95dbe25a644ba57027be7f5a4d9194be',	'Primary Cust A',	'1234567890',	'2026-07-04 12:35:14',	60,	10,	'completed',	'2026-07-04 12:25:14'),
('bd9d657e381e76d005f6da5168f0f258',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Suhas',	'123',	'2026-07-04 17:01:00',	60,	10,	'completed',	'2026-07-04 11:31:25'),
('bff4734b3ee780f46f18e982c21ef979',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'3c470c7e8c8a5eaf67a33b5a76ef0a96',	'1 Frame',	120.00,	'631a3e33a1810e92143c852bae01d53b',	'Maulik',	'9601603394',	'2026-07-07 22:03:00',	60,	10,	'completed',	'2026-07-07 16:33:43'),
('c0565a384b2d04361e68027534d6c34d',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'1b0277515bb74fea18cd3d1d1f879f14',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00,	'ceaa6e8b88b0fe56e157534a1871e649',	'Parshik',	'8799524622',	'2026-05-21 14:57:00',	60,	10,	'completed',	'2026-05-21 09:27:40'),
('c64e686d5946c296a325ac4e660c1d8e',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'9c0e9549d67ab7e8f0e9bbb239f1e4cf',	'9ef701cbf98b98c1e5435b6e05f8f7e4',	'1 Frame',	150.00,	'771aec17151d7acc930774236e34794a',	'Suhas katakiya',	'321',	'2026-07-03 16:53:00',	60,	10,	'cancelled',	'2026-07-03 11:23:49'),
('c74a5915bd523cbe8ade33807b1176d4',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Abc',	'123',	'2026-07-04 17:03:00',	60,	10,	'cancelled',	'2026-07-04 11:33:51'),
('cc6128327d67a58321d9f88dc54cad16',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Suhas',	'123',	'2026-07-10 16:06:00',	60,	10,	'completed',	'2026-07-10 10:36:54'),
('cd4ca19e1152dfae9ed9014223b3b1ce',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00,	'764b2bb918e87eed54c1daf8f0d3ce5a',	'Maulik',	'9601603394',	'2026-07-07 21:56:00',	60,	10,	'completed',	'2026-07-07 16:27:02'),
('db81327802d4e1ce270a5fccb5af1a1d',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00,	'9538c054bc9c8539d11f2dfee01d7ba2',	'Suhas',	'9173445963',	'2026-05-20 23:39:00',	60,	10,	'completed',	'2026-05-20 18:09:52'),
('e28c4d772b2582e8633e41806006370e',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'76f69074a4d6e6cdae2a954fc128f8ef',	'1 Hour',	150.00,	'1c85a37b5b4383eb43b80d877bde23d8',	'suhas',	'9173445963',	'2026-05-20 20:14:00',	60,	10,	'completed',	'2026-05-20 14:44:48'),
('e376039670867a6d89009c26e00a7b38',	'fa02e12b66788a979c2d2f6d988ef1e8',	'535fbe1615e9da4d2c09a6de8cf689e1',	'2c9b3147dfa188e3d68b511baa434652',	'Hourly',	200.00,	'476a25bee19ba9471cce596557174340',	'Primary Cust A',	'1234567890',	'2026-07-04 12:33:41',	60,	10,	'completed',	'2026-07-04 12:23:41'),
('ea92abe5b076f3de3bba810c8d8485e5',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00,	'f6ea09c3ef0432b2bd912e24a6fd5164',	'Abc',	'123',	'2026-07-04 17:26:00',	60,	10,	'completed',	'2026-07-04 11:57:14'),
('f8bf17f3f78c981ced91c7d8f35632f1',	'515cc966beb3db46b64594cbd896571d',	'9291c481550677e14531430accf8a1cc',	'c27aab822ba0278707af34e70204c348',	'1 Frame',	120.00,	'1e45f7926aa655b1a96d6e6a7081e8b0',	'maulik',	'9601603394',	'2026-05-20 20:15:00',	60,	10,	'completed',	'2026-05-20 14:45:18');

CREATE TABLE `customers` (
  `id` char(36) NOT NULL,
  `owner_id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(50) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_owner_phone` (`owner_id`,`phone`),
  CONSTRAINT `fk_customers_owner` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `customers` (`id`, `owner_id`, `name`, `phone`, `created_at`) VALUES
('11d3eec3cfba5a5d8972c26e5c363654',	'bf6c9dfe4eda14ec4e58eee61cd9373f',	'Player A',	'1234567890',	'2026-07-04 12:06:31'),
('18d924c7c0db506a054e1be302a23a5f',	'b7caca4e30079dd79663fdfc4fcf11b8',	'Primary Cust A',	'1234567890',	'2026-07-04 12:25:14'),
('1b0277515bb74fea18cd3d1d1f879f14',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Parshik',	'8799524622',	'2026-05-21 09:27:40'),
('1c8fd378e418cdb06337074224e1a5b0',	'990151bdc88dad0a008a2134fc9e4c86',	'Rohan',	'913461',	'2026-07-07 16:31:08'),
('1d372c59d739fa58d8f220ac877c986c',	'42f9062a60cbfb0c55f1ea78e618a459',	'Primary Cust A',	'1234567890',	'2026-07-04 12:24:06'),
('2a787612d25826d7dd1471494734c581',	'3d5d462baa28d208c661abc8ef1cc5bd',	'Primary Cust A',	'1234567890',	'2026-07-04 12:08:33'),
('2dbc3c2d809f16dd36e8303eaefcf967',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Subas',	'961',	'2026-07-03 07:08:25'),
('3152376b10159909c878446cd8f1dc3f',	'80764fa7d3fad2a15e793e23adf503d8',	'Player B',	'0987654321',	'2026-07-04 12:07:20'),
('35275b335bad2c9e81d4629e915aff58',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Maulik',	'789',	'2026-07-04 11:31:51'),
('38a28113ef97287031657247cc5548f2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 13:27:52'),
('408dd8d2e9e986f64c4c94ed40941be4',	'42f9062a60cbfb0c55f1ea78e618a459',	'Player B',	'0987654321',	'2026-07-04 12:24:06'),
('4b889d33e907bffe355cd1e324fa27ef',	'b7caca4e30079dd79663fdfc4fcf11b8',	'Player B',	'9876543210',	'2026-07-04 12:25:15'),
('4d33d5372184c1e5bf1fa78934299fcb',	'c68e8ceb05c5bcc55645c30896cc15b2',	'Player A',	'1234567890',	'2026-07-04 12:06:08'),
('535776107dab4503a14962770057e759',	'623dea88515a6339ffad62ef2febfe6f',	'Player B',	'0987654321',	'2026-07-04 12:07:01'),
('535fbe1615e9da4d2c09a6de8cf689e1',	'fa02e12b66788a979c2d2f6d988ef1e8',	'Primary Cust A',	'1234567890',	'2026-07-04 12:23:41'),
('54aff68c2b4f0f34d0f44334d19a2760',	'26addc76c9bbc8790175ae5913ed2da1',	'Primary Cust A',	'1234567890',	'2026-07-04 12:24:59'),
('5cf3cd5fe3e5f62f680c11f730579632',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Def',	'456',	'2026-07-04 11:57:23'),
('7264349a699ec82bab6359459f7c0e99',	'fa02e12b66788a979c2d2f6d988ef1e8',	'Player B',	'0987654321',	'2026-07-04 12:23:41'),
('726c05a7f1a031e819b77abc21fc46de',	'623dea88515a6339ffad62ef2febfe6f',	'Primary Cust A',	'1234567890',	'2026-07-04 12:07:01'),
('75bd65784212be957810a61298456205',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas',	'123',	'2026-07-03 11:37:15'),
('76d1fa84e1788cfdd0d35f5b1af0e7a4',	'f79199f3bce6d22b6923babe4d1fbb7b',	'Ishan',	'9924935547',	'2026-05-20 15:39:26'),
('7791e03cdc7e56bf5a89873291408f72',	'f4dabaf9bdd241490b66fee8ce4002ad',	'Suhas',	'9173445963',	'2026-06-17 13:54:10'),
('885269856f2cab3ee5f45421936bf05b',	'f79199f3bce6d22b6923babe4d1fbb7b',	'Suhas',	'9173445963',	'2026-05-20 15:32:08'),
('91ab3949d02eabeb896ec299439622b3',	'80764fa7d3fad2a15e793e23adf503d8',	'Primary Cust A',	'1234567890',	'2026-07-04 12:07:19'),
('9291c481550677e14531430accf8a1cc',	'515cc966beb3db46b64594cbd896571d',	'maulik',	'9601603394',	'2026-05-20 14:45:18'),
('97e95b519eac20322a57c1da17403804',	'67d3884ef2c65a0277342cb7219c0e17',	'Maulik',	'123',	'2026-05-29 16:17:47'),
('99c3cd82ad076b22de5cb54a20536796',	'67d3884ef2c65a0277342cb7219c0e17',	'Suhas',	'9173445963',	'2026-05-19 13:56:48'),
('9c0e9549d67ab7e8f0e9bbb239f1e4cf',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas katakiya',	'321',	'2026-07-03 11:23:49'),
('a619d97937567a1cdc3a1c073d22f52f',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Maulik',	'9601603394',	'2026-05-20 13:25:45'),
('a8fc52affda0133f466001160cdd77e8',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-06-17 14:07:04'),
('ace541547a35a81084143d53fc86dbca',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Abc',	'123',	'2026-05-20 13:50:30'),
('af8a6ee759a376516302685cf52da07f',	'990151bdc88dad0a008a2134fc9e4c86',	'Meet',	'9601603396',	'2026-07-06 05:59:29'),
('bc1fbbb3c6c3bf3c6ad9da02a798f590',	'990151bdc88dad0a008a2134fc9e4c86',	'Suhas',	'123456',	'2026-07-07 16:30:52'),
('cc825f88c3e4280d638350009d59102d',	'515cc966beb3db46b64594cbd896571d',	'suhas',	'9173445963',	'2026-05-20 14:44:48'),
('cd1d7c84728b40033b7b072414b65796',	'3d5d462baa28d208c661abc8ef1cc5bd',	'Player B',	'0987654321',	'2026-07-04 12:08:33'),
('dca16dca32277278cd2b0320aaa06446',	'f4dabaf9bdd241490b66fee8ce4002ad',	'Suhas1',	'1963457963',	'2026-06-17 14:01:28'),
('dfb16be7b25250708aef58a202b13dd5',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas',	'1231',	'2026-07-03 12:00:22'),
('f077c24398dbeac6e090ef5749d453ab',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Maulik',	'79901 16847',	'2026-05-20 18:10:46');

CREATE TABLE `payments` (
  `id` char(36) NOT NULL,
  `user_id` char(36) NOT NULL,
  `plan_id` char(36) NOT NULL,
  `razorpay_order_id` varchar(255) DEFAULT NULL,
  `razorpay_payment_id` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` enum('pending','paid','failed') DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `source` varchar(50) DEFAULT 'pool_app',
  PRIMARY KEY (`id`),
  UNIQUE KEY `razorpay_order_id` (`razorpay_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `payments` (`id`, `user_id`, `plan_id`, `razorpay_order_id`, `razorpay_payment_id`, `amount`, `status`, `created_at`, `source`) VALUES
('255e8bfad4ff227ec2bb9ca3e685b63c',	'f4cd67737d3891053d665022ac731ace',	'basic-plan',	'order_T2gJNZ2Hrjy57j',	NULL,	499.00,	'pending',	'2026-06-17 11:26:38',	'pool_app'),
('2e9b4209d00e5f4a2264c81b291a0ee0',	'f4cd67737d3891053d665022ac731ace',	'basic-plan',	'order_T2gLCoJKEDLymG',	NULL,	499.00,	'pending',	'2026-06-17 11:28:22',	'pool_app'),
('3df22f5280531f26f157458243eaa77d',	'f4dabaf9bdd241490b66fee8ce4002ad',	'basic-plan',	'order_T2hN9n9Br0nfke',	'pay_T2hOGI2ZAguoea',	499.00,	'paid',	'2026-06-17 12:28:54',	'pool_app'),
('5e046c03e24904ad37457ed51fb3a7eb',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'order_T2hjTDxycnq13U',	'pay_T2hjrbh9oa8qq2',	499.00,	'paid',	'2026-06-17 12:50:02',	'pool_app'),
('73b833b53f15f1b42225b8e354f8454f',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'order_T2hGY6hK4M2qMJ',	NULL,	499.00,	'pending',	'2026-06-17 12:22:39',	'pool_app'),
('8621c848008eb46a4197503b523acedc',	'f4dabaf9bdd241490b66fee8ce4002ad',	'basic-plan',	'order_T2hHT883rdqz0C',	'pay_T2hIa73f8hSnCx',	499.00,	'paid',	'2026-06-17 12:23:31',	'pool_app'),
('884098ceaa26a6b64ff289bf80822ef2',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'order_T2hEj6AptYTGW9',	NULL,	499.00,	'pending',	'2026-06-17 12:20:56',	'pool_app'),
('97c36c4db33d7484eef0af0a986186cf',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'order_T2iJo5rYwpvhIz',	'pay_T2iK6kSQbN0Aa4',	499.00,	'paid',	'2026-06-17 13:24:26',	'pool_app'),
('c90234278ef3cdf4e471f1cd20168c0e',	'f4dabaf9bdd241490b66fee8ce4002ad',	'basic-plan',	'order_T2hE2Ty52CLOts',	NULL,	499.00,	'pending',	'2026-06-17 12:20:16',	'pool_app'),
('d4966e607370c9a6668f3216827cad47',	'f4dabaf9bdd241490b66fee8ce4002ad',	'pro-plan',	'order_T2hPeGxczQIhTY',	'pay_T2hPlBq9Z5olTC',	999.00,	'paid',	'2026-06-17 12:31:16',	'pool_app'),
('eccaa67327a280d4aea033e058d648aa',	'f4cd67737d3891053d665022ac731ace',	'basic-plan',	'order_T2gMtKx2MTM6FC',	NULL,	499.00,	'pending',	'2026-06-17 11:29:58',	'pool_app');

CREATE TABLE `session_games` (
  `id` char(36) NOT NULL,
  `session_id` char(36) NOT NULL,
  `loser_player_id` char(36) NOT NULL,
  `cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_session_id` (`session_id`),
  KEY `idx_loser_player_id` (`loser_player_id`),
  CONSTRAINT `fk_session_games_player` FOREIGN KEY (`loser_player_id`) REFERENCES `session_players` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_session_games_session` FOREIGN KEY (`session_id`) REFERENCES `sessions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `session_games` (`id`, `session_id`, `loser_player_id`, `cost`, `created_at`) VALUES
('10d878058a04c7f2837975a2a66cb107',	'41bfbff47e77300c5f21bddec57a03c1',	'f2a1d4ecd7446bdeb3b468a3354fd289',	100.00,	'2026-07-06 06:51:30'),
('13018538622f94aba124759595704e71',	'1c4de155520e31b2c6de4759433532b8',	'617499dc314a8cc4997fbc93c1f00568',	100.00,	'2026-07-07 16:28:21'),
('3961e56b1ee1b25281b398e8fcd3ec98',	'14610015f46797f479012f5bcf1c57c4',	'dcd99c04162c48e615f7bf49ebe2e7ca',	100.00,	'2026-07-07 10:01:47'),
('3f13316b88fb589c10922e427864b72c',	'14610015f46797f479012f5bcf1c57c4',	'dcd99c04162c48e615f7bf49ebe2e7ca',	100.00,	'2026-07-07 09:55:38'),
('52b700755b1e9bd1c86ff3b89304704c',	'337e89d3ba7ee1b796c7e3992a994ba4',	'fc547683273af45b49fd6cf4c7907e68',	100.00,	'2026-07-07 09:44:04'),
('5308ed551a5ecd347c22e8b310856592',	'1c4de155520e31b2c6de4759433532b8',	'5be4b57331a13832494157af66a911da',	100.00,	'2026-07-07 16:28:06'),
('77fe539737df3f2a62a14afc73fc5cff',	'1c4de155520e31b2c6de4759433532b8',	'617499dc314a8cc4997fbc93c1f00568',	100.00,	'2026-07-07 16:27:40'),
('7850796e930494a626d2e180dd8b1b71',	'14610015f46797f479012f5bcf1c57c4',	'60c2943f1a6c54fb712accb105ba6abe',	100.00,	'2026-07-07 10:01:43'),
('91ad7d99398310a25e83623479b49ee6',	'14610015f46797f479012f5bcf1c57c4',	'dcd99c04162c48e615f7bf49ebe2e7ca',	100.00,	'2026-07-07 10:17:42'),
('9c570b6869ef169f94a6ae0ded1b6ce7',	'4965767f240949c642e2485e12bc590c',	'028a87599298fad5e01ce851414a80c2',	100.00,	'2026-07-10 10:42:04'),
('c8f8e961142e1eeaa66dbf36b7f8f574',	'14610015f46797f479012f5bcf1c57c4',	'60c2943f1a6c54fb712accb105ba6abe',	100.00,	'2026-07-07 09:55:33'),
('cba3019bea31c5876b4e1741a07462fa',	'1c4de155520e31b2c6de4759433532b8',	'50a10737c785258d02cf98106849b17d',	100.00,	'2026-07-07 16:31:13'),
('ee993cf5a53e070b1c72b9e5097a5be0',	'14610015f46797f479012f5bcf1c57c4',	'60c2943f1a6c54fb712accb105ba6abe',	100.00,	'2026-07-07 09:49:26'),
('f2f9811dbba7e87a0235e063ef612ed4',	'41bfbff47e77300c5f21bddec57a03c1',	'4af8dd548fc02d4b2a2342dbe6da0692',	100.00,	'2026-07-06 06:51:23');

CREATE TABLE `session_items` (
  `id` char(36) NOT NULL,
  `session_id` char(36) NOT NULL,
  `buyer_player_id` char(36) DEFAULT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `quantity` int DEFAULT '1',
  `price` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `session_id` (`session_id`),
  KEY `fk_session_items_player` (`buyer_player_id`),
  CONSTRAINT `fk_session_items_player` FOREIGN KEY (`buyer_player_id`) REFERENCES `session_players` (`id`) ON DELETE SET NULL,
  CONSTRAINT `session_items_ibfk_1` FOREIGN KEY (`session_id`) REFERENCES `sessions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `session_items` (`id`, `session_id`, `buyer_player_id`, `item_name`, `quantity`, `price`, `total`, `created_at`) VALUES
('1ee7500f4ebcb21c66ff05c7d5e2640d',	'403c52cf1316a5ee7745d1c11487b10e',	NULL,	'',	1,	150.00,	150.00,	'2026-05-20 18:10:03'),
('2e9b68e64d9975c670b9dae9fb7e7ad8',	'2ece10195cb12a84049bf95c06aac76b',	NULL,	'Coke',	1,	40.00,	40.00,	'2026-07-03 12:00:46'),
('36fec6a0dedc73f0f2fcda49443c625f',	'1c4de155520e31b2c6de4759433532b8',	'617499dc314a8cc4997fbc93c1f00568',	'Test',	1,	10.00,	10.00,	'2026-07-07 16:28:49'),
('3f9fbccce04d871ef6e438a16c4fb848',	'4f35caaff7c60ff62bdccc2ad2253ab4',	NULL,	'cigarate',	1,	18.00,	18.00,	'2026-05-21 09:28:03'),
('44bcbae485d5859bb2ef43629f2032e4',	'2b21f46e7ba72bc0b4318727189757e9',	NULL,	'',	1,	120.00,	120.00,	'2026-05-20 13:49:21'),
('5607527176257565eebdbd9ccf8544f0',	'33304db3bb4c5dfde23ae5aa51955f9d',	NULL,	'Coke',	1,	40.00,	40.00,	'2026-07-03 07:08:44'),
('67d20c3c08b48d43ddeb59498c8b5c81',	'8824010e6f7f5837537dba92d74593d2',	NULL,	'',	1,	150.00,	150.00,	'2026-05-20 17:58:10'),
('6fc9554863792957f0c59299dcf9f8ac',	'a26469e6396ea616ed05ca9108efb412',	NULL,	'',	1,	150.00,	150.00,	'2026-05-20 17:55:10'),
('7d65e97cd005a5f9cfeb3fc467f7344e',	'c66a4b67c041ed06c51fc71159727cb7',	NULL,	'',	1,	25.00,	25.00,	'2026-05-19 13:57:35'),
('86ad7992299a748c2e0a35ba3979f5f3',	'af272bf86cd32235eba0c0c9c9cf587e',	NULL,	'coke',	1,	20.00,	20.00,	'2026-05-20 13:38:37'),
('9740f52f893d1ad4e7a2c8f2f1e2dff9',	'0db96d8f837a268736ca9659558c19a3',	NULL,	'coke',	1,	150.00,	150.00,	'2026-05-20 14:47:44'),
('997dc6ec808e94e9578ee082fb1cbf3a',	'f282aa9f6ab80022a84d68e8c05de4a7',	NULL,	'',	1,	80.00,	80.00,	'2026-05-20 18:10:58'),
('a4543f9137a4ff36af7d2c5c1de8db60',	'b982079d9f6e5659cae1b1b15688017d',	NULL,	'Coke',	1,	40.00,	40.00,	'2026-07-03 12:03:00'),
('ab9ffa4932873265d8bdb301a9683d14',	'9637e4120466ffd10b74b3a846582679',	NULL,	'Raj',	1,	20.00,	20.00,	'2026-05-20 15:32:32'),
('c977ce683b5e8523d61c0596233d4b68',	'd83b31ca19152d4afe60eed59a2d7131',	NULL,	'',	1,	150.00,	150.00,	'2026-05-20 14:49:57'),
('d2841583abbc0eecec246bd2cecdaf24',	'8db3f20f772163c76d3362b3d4003071',	NULL,	'Coke',	1,	40.00,	40.00,	'2026-07-04 11:57:32'),
('efde907e84452ca2080c8babc0de4f9d',	'fbabd43b5dc2c148c7450bd9b0c87cb9',	NULL,	'',	1,	25.00,	25.00,	'2026-05-19 14:00:38'),
('fa0d433dea2c633a73636d6a4745d7dd',	'4f35caaff7c60ff62bdccc2ad2253ab4',	NULL,	'Masalo',	1,	35.00,	35.00,	'2026-05-21 09:27:56'),
('fc61a1456f75e7f89fe9551f1987dfe5',	'377f295a475a0d37b4265144d28392b1',	NULL,	'',	1,	150.00,	150.00,	'2026-05-20 13:50:39');

CREATE TABLE `session_players` (
  `id` char(36) NOT NULL,
  `session_id` char(36) NOT NULL,
  `customer_id` char(36) NOT NULL,
  `joined_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `left_at` timestamp NULL DEFAULT NULL,
  `status` enum('active','left') DEFAULT 'active',
  PRIMARY KEY (`id`),
  KEY `idx_session_id` (`session_id`),
  KEY `idx_customer_id` (`customer_id`),
  CONSTRAINT `fk_session_players_customer` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_session_players_session` FOREIGN KEY (`session_id`) REFERENCES `sessions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `session_players` (`id`, `session_id`, `customer_id`, `joined_at`, `left_at`, `status`) VALUES
('028a87599298fad5e01ce851414a80c2',	'4965767f240949c642e2485e12bc590c',	'75bd65784212be957810a61298456205',	'2026-07-10 10:41:25',	NULL,	'active'),
('02edad3efdccb921f4950acc8bfe1bed',	'7a69a4c4226491ced6aa4e30618d9778',	'bc1fbbb3c6c3bf3c6ad9da02a798f590',	'2026-07-07 16:33:52',	NULL,	'active'),
('17b1e7c37e37b873d37e121ff20403c9',	'4965767f240949c642e2485e12bc590c',	'5cf3cd5fe3e5f62f680c11f730579632',	'2026-07-10 10:41:25',	NULL,	'active'),
('1bce6406e1dc4a9ba2cf1beee79e8fb5',	'0d6ff39ca38f8866a0a7c09fcd14fb11',	'18d924c7c0db506a054e1be302a23a5f',	'2026-07-04 12:25:15',	NULL,	'active'),
('1c9574f29a8aaa41643aafaf05ec8aea',	'e62d07965d71ee2d31595c7b37850042',	'91ab3949d02eabeb896ec299439622b3',	'2026-07-04 12:07:20',	NULL,	'active'),
('2a17b733430d822fb183f681cf056130',	'a2adbe05db08953a093181e2d863b54a',	'535fbe1615e9da4d2c09a6de8cf689e1',	'2026-07-04 12:23:41',	NULL,	'active'),
('2e64fa3bd18dec8e0446d1f45a809bec',	'4cfe8bf6ddaecc8b7f5a13f9f4dc2270',	'75bd65784212be957810a61298456205',	'2026-07-04 11:31:51',	NULL,	'active'),
('30c0871d695cf51a021c7fb14d797ea0',	'd42f43b8b86ccf6da5ecc1b20d61b628',	'1c8fd378e418cdb06337074224e1a5b0',	'2026-07-07 16:35:30',	NULL,	'active'),
('3c7f0b4b94c38c574e11a5b7515498fe',	'673a2519313672c3e4d3883758c2ca3a',	'1d372c59d739fa58d8f220ac877c986c',	'2026-07-04 12:24:06',	NULL,	'active'),
('46dc15c8063c0c3e6cb85a28685d777f',	'8db3f20f772163c76d3362b3d4003071',	'35275b335bad2c9e81d4629e915aff58',	'2026-07-04 11:57:23',	NULL,	'active'),
('4af8dd548fc02d4b2a2342dbe6da0692',	'41bfbff47e77300c5f21bddec57a03c1',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-06 05:59:29',	NULL,	'active'),
('50a10737c785258d02cf98106849b17d',	'1c4de155520e31b2c6de4759433532b8',	'bc1fbbb3c6c3bf3c6ad9da02a798f590',	'2026-07-07 16:30:52',	NULL,	'active'),
('548eb49a2a7de2647860727eb8b733af',	'337e89d3ba7ee1b796c7e3992a994ba4',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-06 07:14:24',	NULL,	'active'),
('5be4b57331a13832494157af66a911da',	'1c4de155520e31b2c6de4759433532b8',	'af8a6ee759a376516302685cf52da07f',	'2026-07-07 16:27:10',	NULL,	'active'),
('60c2943f1a6c54fb712accb105ba6abe',	'14610015f46797f479012f5bcf1c57c4',	'af8a6ee759a376516302685cf52da07f',	'2026-07-07 09:45:05',	NULL,	'active'),
('617499dc314a8cc4997fbc93c1f00568',	'1c4de155520e31b2c6de4759433532b8',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-07 16:27:10',	NULL,	'active'),
('619b615a0f6767f7286fd43db1d40c16',	'b982079d9f6e5659cae1b1b15688017d',	'75bd65784212be957810a61298456205',	'2026-07-03 12:02:48',	NULL,	'active'),
('62aac29e98d0c2817aef37dd4bceb68b',	'836976082d2c7f693041f1b1db2cc9a0',	'535776107dab4503a14962770057e759',	'2026-07-04 12:07:01',	NULL,	'active'),
('6e38bcd8d488df3c84b767b7b3644629',	'e62d07965d71ee2d31595c7b37850042',	'3152376b10159909c878446cd8f1dc3f',	'2026-07-04 12:07:20',	NULL,	'active'),
('729a864d3f10018bb38e22c2b3fea9db',	'22e49406808bb4d127623605539619ca',	'cd1d7c84728b40033b7b072414b65796',	'2026-07-04 12:08:33',	NULL,	'active'),
('77eb61243516d37270bb08a034562885',	'1c4de155520e31b2c6de4759433532b8',	'1c8fd378e418cdb06337074224e1a5b0',	'2026-07-07 16:31:08',	NULL,	'active'),
('8d721c80fd1b2ec2389149d424987eb1',	'2ece10195cb12a84049bf95c06aac76b',	'75bd65784212be957810a61298456205',	'2026-07-03 12:00:22',	NULL,	'active'),
('93a3ffac344da5a4a27ef6367b47e04c',	'd42f43b8b86ccf6da5ecc1b20d61b628',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-07 16:35:30',	NULL,	'active'),
('a186418ab119aabfbf26f9a41c3a1217',	'a2adbe05db08953a093181e2d863b54a',	'7264349a699ec82bab6359459f7c0e99',	'2026-07-04 12:23:41',	NULL,	'active'),
('a58b3b9e40ad77626ef34e272c95092c',	'e2e6fbbd0abeedd16cc10279562ff6a2',	'5cf3cd5fe3e5f62f680c11f730579632',	'2026-07-10 10:37:02',	NULL,	'active'),
('a997a0a791b43003b7d968e955d73457',	'7a69a4c4226491ced6aa4e30618d9778',	'af8a6ee759a376516302685cf52da07f',	'2026-07-07 16:33:52',	NULL,	'active'),
('af518c6a6d0d28e013e79753bd2a1e57',	'836976082d2c7f693041f1b1db2cc9a0',	'726c05a7f1a031e819b77abc21fc46de',	'2026-07-04 12:07:01',	NULL,	'active'),
('b2a1f8d9759eab7981cfad1377094bd3',	'e2e6fbbd0abeedd16cc10279562ff6a2',	'75bd65784212be957810a61298456205',	'2026-07-10 10:37:02',	NULL,	'active'),
('b2a9b77b0f073409c76090a588fd0863',	'8db3f20f772163c76d3362b3d4003071',	'5cf3cd5fe3e5f62f680c11f730579632',	'2026-07-04 11:57:23',	NULL,	'active'),
('ba8473ac1f44555be44103b96300255e',	'4cfe8bf6ddaecc8b7f5a13f9f4dc2270',	'35275b335bad2c9e81d4629e915aff58',	'2026-07-04 11:31:51',	NULL,	'active'),
('bf1b7973a69f0576102a798945752d5e',	'2ece10195cb12a84049bf95c06aac76b',	'dfb16be7b25250708aef58a202b13dd5',	'2026-07-03 12:00:22',	NULL,	'active'),
('dcd99c04162c48e615f7bf49ebe2e7ca',	'14610015f46797f479012f5bcf1c57c4',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-07 09:45:05',	NULL,	'active'),
('e47823cc213737c005515e86fedc30af',	'673a2519313672c3e4d3883758c2ca3a',	'408dd8d2e9e986f64c4c94ed40941be4',	'2026-07-04 12:24:06',	NULL,	'active'),
('e4916fc1a6912e6f7fb2a0b4c7365153',	'7a69a4c4226491ced6aa4e30618d9778',	'1c8fd378e418cdb06337074224e1a5b0',	'2026-07-07 16:33:52',	NULL,	'active'),
('e5d5b606842cdcc1f429103e98e84cef',	'22e49406808bb4d127623605539619ca',	'2a787612d25826d7dd1471494734c581',	'2026-07-04 12:08:33',	NULL,	'active'),
('ea3d4abacf4546ac4c0737795e0eb5ac',	'b982079d9f6e5659cae1b1b15688017d',	'dfb16be7b25250708aef58a202b13dd5',	'2026-07-03 12:02:48',	NULL,	'active'),
('eeb896baaab6cdd71df2c1df15e13770',	'7a69a4c4226491ced6aa4e30618d9778',	'a8fc52affda0133f466001160cdd77e8',	'2026-07-07 16:33:52',	NULL,	'active'),
('f23d28246bf15e4c06176539c41aa615',	'0d6ff39ca38f8866a0a7c09fcd14fb11',	'4b889d33e907bffe355cd1e324fa27ef',	'2026-07-04 12:25:15',	'2026-07-04 12:25:16',	'left'),
('f2a1d4ecd7446bdeb3b468a3354fd289',	'41bfbff47e77300c5f21bddec57a03c1',	'af8a6ee759a376516302685cf52da07f',	'2026-07-06 05:59:29',	NULL,	'active'),
('f53a3cf92d3fe578f9f22747a5dd1b7f',	'8db3f20f772163c76d3362b3d4003071',	'75bd65784212be957810a61298456205',	'2026-07-04 11:57:23',	NULL,	'active'),
('fc547683273af45b49fd6cf4c7907e68',	'337e89d3ba7ee1b796c7e3992a994ba4',	'af8a6ee759a376516302685cf52da07f',	'2026-07-06 07:14:24',	NULL,	'active');

CREATE TABLE `sessions` (
  `id` char(36) NOT NULL,
  `table_id` char(36) NOT NULL,
  `owner_id` char(36) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(50) DEFAULT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `expected_end_time` datetime DEFAULT NULL,
  `duration_minutes` decimal(10,2) DEFAULT NULL,
  `total_amount` decimal(10,2) DEFAULT NULL,
  `status` enum('active','completed','cancelled') DEFAULT 'active',
  `cancel_reason` text,
  `is_paid` tinyint(1) DEFAULT '0',
  `amount_paid` decimal(10,2) DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `customer_id` char(36) DEFAULT NULL,
  `booking_id` char(36) DEFAULT NULL,
  `pricing_id` char(36) DEFAULT NULL,
  `pricing_label` varchar(255) DEFAULT NULL,
  `pricing_amount` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `fk_sessions_owner` (`owner_id`),
  KEY `fk_sessions_table` (`table_id`),
  KEY `fk_session_customer` (`customer_id`),
  KEY `fk_session_booking` (`booking_id`),
  CONSTRAINT `fk_session_booking` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE SET NULL,
  CONSTRAINT `fk_session_customer` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL,
  CONSTRAINT `fk_sessions_owner` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_sessions_table` FOREIGN KEY (`table_id`) REFERENCES `tables` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `sessions` (`id`, `table_id`, `owner_id`, `customer_name`, `customer_phone`, `start_time`, `end_time`, `expected_end_time`, `duration_minutes`, `total_amount`, `status`, `cancel_reason`, `is_paid`, `amount_paid`, `created_at`, `customer_id`, `booking_id`, `pricing_id`, `pricing_label`, `pricing_amount`) VALUES
('0a0341d6def994a82d25f1407ade4bad',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 19:09:54',	'2026-05-20 19:16:53',	NULL,	7.00,	120.00,	'completed',	NULL,	1,	120.00,	'2026-05-20 13:39:54',	'38a28113ef97287031657247cc5548f2',	'8fca7855eda662a416d1df5a9952c2bc',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('0d6ff39ca38f8866a0a7c09fcd14fb11',	'95dbe25a644ba57027be7f5a4d9194be',	'b7caca4e30079dd79663fdfc4fcf11b8',	'Player A',	'1234567890',	'2026-07-04 17:55:15',	NULL,	'2026-07-04 18:55:15',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:25:15',	'18d924c7c0db506a054e1be302a23a5f',	'b7a65984de9069029ff3fd7dbedc8658',	'63a423d11fb1eb0cc874b10a382709c2',	'Hourly',	200.00),
('0db96d8f837a268736ca9659558c19a3',	'1c85a37b5b4383eb43b80d877bde23d8',	'515cc966beb3db46b64594cbd896571d',	'suhas',	'9173445963',	'2026-05-20 20:17:31',	'2026-05-20 20:17:48',	'2026-05-20 21:17:31',	1.00,	300.00,	'completed',	NULL,	1,	300.00,	'2026-05-20 14:47:31',	'cc825f88c3e4280d638350009d59102d',	'96fc2e7bed82c5548110cd14e65499ee',	'76f69074a4d6e6cdae2a954fc128f8ef',	'1 Hour',	150.00),
('14610015f46797f479012f5bcf1c57c4',	'764b2bb918e87eed54c1daf8f0d3ce5a',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-07 15:15:05',	'2026-07-07 15:57:32',	NULL,	43.00,	120.00,	'completed',	NULL,	0,	0.00,	'2026-07-07 09:45:05',	'a8fc52affda0133f466001160cdd77e8',	'1a1649011ab126660db96025bb6e9778',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00),
('1c4de155520e31b2c6de4759433532b8',	'764b2bb918e87eed54c1daf8f0d3ce5a',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-07 21:57:10',	'2026-07-07 22:02:34',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-07 16:27:10',	'a8fc52affda0133f466001160cdd77e8',	'cd4ca19e1152dfae9ed9014223b3b1ce',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00),
('22e49406808bb4d127623605539619ca',	'b2c2fadc24ad40694f87f4eeb6326c62',	'3d5d462baa28d208c661abc8ef1cc5bd',	'Player A',	'1234567890',	'2026-07-04 17:38:33',	NULL,	'2026-07-04 18:38:33',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:08:33',	'2a787612d25826d7dd1471494734c581',	'6b3382aaed8e67ca065486d97dfd11c6',	'bb57ecebc067372b66b8765ed1124876',	'Hourly',	200.00),
('25505371c81f84faffa31306f151d83b',	'1e45f7926aa655b1a96d6e6a7081e8b0',	'515cc966beb3db46b64594cbd896571d',	'maulik',	'9601603394',	'2026-05-20 20:15:22',	'2026-05-20 20:16:02',	NULL,	1.00,	120.00,	'completed',	NULL,	0,	100.00,	'2026-05-20 14:45:22',	'9291c481550677e14531430accf8a1cc',	'f8bf17f3f78c981ced91c7d8f35632f1',	'c27aab822ba0278707af34e70204c348',	'1 Frame',	120.00),
('2b21f46e7ba72bc0b4318727189757e9',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 19:19:12',	'2026-05-20 19:19:23',	NULL,	1.00,	240.00,	'completed',	NULL,	1,	240.00,	'2026-05-20 13:49:12',	'38a28113ef97287031657247cc5548f2',	'54565cfd6b2f88905616c50363b4ccf0',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('2b666093bbdb9df0632ab2b59c6f4bcf',	'b9a07490c4f5891dd84aeda1dae0d06c',	'67d3884ef2c65a0277342cb7219c0e17',	'Maulik',	'123',	'2026-05-29 21:47:50',	NULL,	'2026-05-29 22:47:50',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-05-29 16:17:50',	'97e95b519eac20322a57c1da17403804',	'060e9f913deb9f51d3566a90c2bb6f73',	'286f5baca694606b6b3e015dc907c737',	'1 Hour',	160.00),
('2ece10195cb12a84049bf95c06aac76b',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Abc',	'123',	'2026-07-03 17:30:22',	'2026-07-03 17:31:42',	NULL,	2.00,	190.00,	'completed',	NULL,	0,	0.00,	'2026-07-03 12:00:22',	'75bd65784212be957810a61298456205',	'9dcbbf2ccf7498016a9733f1adee63bd',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('33304db3bb4c5dfde23ae5aa51955f9d',	'771aec17151d7acc930774236e34794a',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Subas',	'961',	'2026-07-03 12:38:27',	'2026-07-03 12:38:51',	NULL,	1.00,	190.00,	'completed',	NULL,	1,	190.00,	'2026-07-03 07:08:27',	'2dbc3c2d809f16dd36e8303eaefcf967',	'45ffc7a364e7e3370d02405be13b359b',	'9ef701cbf98b98c1e5435b6e05f8f7e4',	'1 Frame',	150.00),
('337e89d3ba7ee1b796c7e3992a994ba4',	'764b2bb918e87eed54c1daf8f0d3ce5a',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-06 12:44:24',	'2026-07-07 15:14:20',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-06 07:14:24',	'a8fc52affda0133f466001160cdd77e8',	'1d17f02a44003b03cbd7ea07c7b753c8',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00),
('377f295a475a0d37b4265144d28392b1',	'1a3cb52383f6a8c5b860fa2f18b789e3',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Abc',	'123',	'2026-05-20 19:20:33',	'2026-05-20 19:20:44',	'2026-05-20 20:20:33',	1.00,	300.00,	'completed',	NULL,	0,	150.00,	'2026-05-20 13:50:33',	'ace541547a35a81084143d53fc86dbca',	'94b25f4c27b92208f464ae52c2d0b4fc',	'3bc8f975d8849cc27434f78ab5a58362',	'1 Hour',	150.00),
('403c52cf1316a5ee7745d1c11487b10e',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 23:39:56',	'2026-05-20 23:40:05',	NULL,	1.00,	270.00,	'completed',	NULL,	0,	0.00,	'2026-05-20 18:09:56',	'38a28113ef97287031657247cc5548f2',	'db81327802d4e1ce270a5fccb5af1a1d',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('41bfbff47e77300c5f21bddec57a03c1',	'764b2bb918e87eed54c1daf8f0d3ce5a',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-06 11:29:29',	'2026-07-06 12:43:02',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-06 05:59:29',	'a8fc52affda0133f466001160cdd77e8',	'002d58e2fde7696046ac616281d41037',	'1d44bb65026bc79a85cc96e496307d1e',	'1 Frame',	120.00),
('4965767f240949c642e2485e12bc590c',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas',	'123',	'2026-07-10 16:11:25',	'2026-07-10 16:12:15',	NULL,	1.00,	150.00,	'completed',	NULL,	0,	100.00,	'2026-07-10 10:41:25',	'75bd65784212be957810a61298456205',	'212b5c9d44e6f7cc8f7f6f37169cd5fc',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('49ed285d189ddd27de67dea6e819b905',	'e1e1e97848d407509e59dd9062d94b4e',	'f79199f3bce6d22b6923babe4d1fbb7b',	'Ishan',	'9924935547',	'2026-05-20 21:09:32',	'2026-05-20 21:11:00',	NULL,	2.00,	120.00,	'completed',	NULL,	0,	50.00,	'2026-05-20 15:39:32',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'8282e927f61fa3889a51d14a5694a67d',	'00b7bf6b31afa007939b1d00ef298c76',	'1 Frame',	120.00),
('4cfe8bf6ddaecc8b7f5a13f9f4dc2270',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas',	'123',	'2026-07-04 17:01:51',	'2026-07-04 17:02:13',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-04 11:31:51',	'75bd65784212be957810a61298456205',	'bd9d657e381e76d005f6da5168f0f258',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('4f35caaff7c60ff62bdccc2ad2253ab4',	'ceaa6e8b88b0fe56e157534a1871e649',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Parshik',	'8799524622',	'2026-05-21 14:57:43',	'2026-05-21 14:58:10',	'2026-05-21 15:57:43',	1.00,	203.00,	'completed',	NULL,	0,	100.00,	'2026-05-21 09:27:43',	'1b0277515bb74fea18cd3d1d1f879f14',	'c0565a384b2d04361e68027534d6c34d',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00),
('673a2519313672c3e4d3883758c2ca3a',	'83f5ca5515284a0b89bbf98228ea2848',	'42f9062a60cbfb0c55f1ea78e618a459',	'Player A',	'1234567890',	'2026-07-04 17:54:06',	NULL,	'2026-07-04 18:54:06',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:24:06',	'1d372c59d739fa58d8f220ac877c986c',	'a37a22ef47fdf92def371321b623b642',	'ec8f0aa81d7fa9bb0d91318bc27c04e0',	'Hourly',	200.00),
('6bdd84125d52bf121bc54e5ebdc05419',	'c0d25a696644cc9f10f886d0e442715c',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-06-17 19:39:00',	'2026-06-17 21:35:44',	'2026-06-17 20:09:00',	117.00,	80.00,	'completed',	NULL,	1,	80.00,	'2026-06-17 14:09:00',	'a8fc52affda0133f466001160cdd77e8',	'4a81b7b6d345532cfd01ef9504f0f39f',	'5f07c79fba16004e74b7d42973d5c437',	'Half Hour',	80.00),
('7a69a4c4226491ced6aa4e30618d9778',	'631a3e33a1810e92143c852bae01d53b',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-07 22:03:52',	'2026-07-07 22:04:22',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-07 16:33:52',	'a8fc52affda0133f466001160cdd77e8',	'bff4734b3ee780f46f18e982c21ef979',	'3c470c7e8c8a5eaf67a33b5a76ef0a96',	'1 Frame',	120.00),
('836976082d2c7f693041f1b1db2cc9a0',	'e137dd674bba676448791c03600e8bc9',	'623dea88515a6339ffad62ef2febfe6f',	'Player A',	'1234567890',	'2026-07-04 17:37:01',	NULL,	'2026-07-04 18:37:01',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:07:01',	'726c05a7f1a031e819b77abc21fc46de',	'02e3dbab15912f5beef30021a145ac44',	'f2cd5fe9ebf90bd04425fc6034ad56a7',	'Hourly',	200.00),
('8824010e6f7f5837537dba92d74593d2',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 23:28:01',	'2026-05-20 23:28:18',	NULL,	1.00,	270.00,	'completed',	NULL,	0,	0.00,	'2026-05-20 17:58:01',	'38a28113ef97287031657247cc5548f2',	'6c16aa466a2a19794db0bc787fdb2282',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('8db3f20f772163c76d3362b3d4003071',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Abc',	'123',	'2026-07-04 17:27:23',	'2026-07-10 16:06:31',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-04 11:57:23',	'75bd65784212be957810a61298456205',	'ea92abe5b076f3de3bba810c8d8485e5',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('9637e4120466ffd10b74b3a846582679',	'e1e1e97848d407509e59dd9062d94b4e',	'f79199f3bce6d22b6923babe4d1fbb7b',	'Suhas',	'9173445963',	'2026-05-20 21:02:12',	'2026-05-20 21:03:52',	NULL,	2.00,	140.00,	'completed',	NULL,	0,	100.00,	'2026-05-20 15:32:12',	'885269856f2cab3ee5f45421936bf05b',	'2ad468d9c12b10d839dc18dc57e8d9c3',	'00b7bf6b31afa007939b1d00ef298c76',	'1 Frame',	120.00),
('a26469e6396ea616ed05ca9108efb412',	'25727fd1d957be0e8598d96e3dc94fdd',	'f79199f3bce6d22b6923babe4d1fbb7b',	'Ishan',	'9924935547',	'2026-05-20 21:11:17',	'2026-05-20 23:25:13',	NULL,	134.00,	270.00,	'completed',	NULL,	0,	0.00,	'2026-05-20 15:41:17',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'a1a517c1258dd8a55907853c13734689',	'b242ccb02b257c60756ea817a5f2585c',	'1 Frame',	120.00),
('a2adbe05db08953a093181e2d863b54a',	'476a25bee19ba9471cce596557174340',	'fa02e12b66788a979c2d2f6d988ef1e8',	'Player A',	'1234567890',	'2026-07-04 17:53:41',	NULL,	'2026-07-04 18:53:41',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:23:41',	'535fbe1615e9da4d2c09a6de8cf689e1',	'e376039670867a6d89009c26e00a7b38',	'2c9b3147dfa188e3d68b511baa434652',	'Hourly',	200.00),
('ae713499135bfce84af6e4fb5905fac5',	'ceaa6e8b88b0fe56e157534a1871e649',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 19:44:13',	'2026-05-20 19:44:18',	'2026-05-20 20:44:13',	1.00,	150.00,	'completed',	NULL,	1,	150.00,	'2026-05-20 14:14:13',	'38a28113ef97287031657247cc5548f2',	'3e3fd5b21e1affa372dd23f7732aecc1',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00),
('af272bf86cd32235eba0c0c9c9cf587e',	'ceaa6e8b88b0fe56e157534a1871e649',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Maulik',	'9601603394',	'2026-05-20 19:00:26',	'2026-05-20 19:09:34',	'2026-05-20 20:00:26',	10.00,	170.00,	'completed',	NULL,	1,	170.00,	'2026-05-20 13:30:26',	'a619d97937567a1cdc3a1c073d22f52f',	'1809fb2ae875a8394877e316f80dbb17',	'e03daee076ce5bbc6e4dc14200fd4c96',	'1 Hour',	150.00),
('b982079d9f6e5659cae1b1b15688017d',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Maulik',	'123',	'2026-07-03 17:32:48',	'2026-07-04 17:00:58',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-03 12:02:48',	'75bd65784212be957810a61298456205',	'473ca78ebee4aa7871fb5ab2d5422249',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('c5a01ab685591d83234be8a5f82d5e7c',	'ceaa6e8b88b0fe56e157534a1871e649',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Maulik',	'9601603394',	'2026-05-20 19:10:24',	'2026-05-20 19:40:49',	'2026-05-20 19:40:24',	31.00,	80.00,	'completed',	NULL,	0,	0.00,	'2026-05-20 13:40:24',	'a619d97937567a1cdc3a1c073d22f52f',	'2683f5667b64d609408730c263ccfc6f',	'9001518bffc99b62ea7ccf1948613e5e',	'Half Hour',	80.00),
('c66a4b67c041ed06c51fc71159727cb7',	'b9a07490c4f5891dd84aeda1dae0d06c',	'67d3884ef2c65a0277342cb7219c0e17',	'Suhas',	'9173445963',	'2026-05-19 19:27:04',	'2026-05-19 19:27:51',	'2026-05-19 20:27:04',	1.00,	185.00,	'completed',	NULL,	1,	185.00,	'2026-05-19 13:57:04',	'99c3cd82ad076b22de5cb54a20536796',	'332dd9ce60ee6d5ed9d79c47d1851c9b',	'286f5baca694606b6b3e015dc907c737',	'1 Hour',	160.00),
('d42f43b8b86ccf6da5ecc1b20d61b628',	'631a3e33a1810e92143c852bae01d53b',	'990151bdc88dad0a008a2134fc9e4c86',	'Maulik',	'9601603394',	'2026-07-07 22:05:30',	NULL,	NULL,	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-07 16:35:30',	'a8fc52affda0133f466001160cdd77e8',	'55203ce485c09335ae667e1226f8d056',	'3c470c7e8c8a5eaf67a33b5a76ef0a96',	'1 Frame',	120.00),
('d7bb082d19f52ba4c5f8e24c02b1c260',	'1c85a37b5b4383eb43b80d877bde23d8',	'515cc966beb3db46b64594cbd896571d',	'suhas',	'9173445963',	'2026-05-20 20:14:52',	'2026-05-20 20:15:41',	'2026-05-20 21:14:52',	1.00,	150.00,	'completed',	NULL,	1,	150.00,	'2026-05-20 14:44:52',	'cc825f88c3e4280d638350009d59102d',	'e28c4d772b2582e8633e41806006370e',	'76f69074a4d6e6cdae2a954fc128f8ef',	'1 Hour',	150.00),
('d83b31ca19152d4afe60eed59a2d7131',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Suhas',	'9173445963',	'2026-05-20 20:19:50',	'2026-05-20 20:19:58',	NULL,	1.00,	270.00,	'completed',	NULL,	0,	110.00,	'2026-05-20 14:49:50',	'38a28113ef97287031657247cc5548f2',	'a7c9a88b3d9675854617aad901af25d5',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('e2e6fbbd0abeedd16cc10279562ff6a2',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'Suhas',	'123',	'2026-07-10 16:07:02',	'2026-07-10 16:10:52',	NULL,	NULL,	NULL,	'cancelled',	'Cancelled from dashboard',	0,	0.00,	'2026-07-10 10:37:02',	'75bd65784212be957810a61298456205',	'cc6128327d67a58321d9f88dc54cad16',	'e2651fdb48c187500142b09adff00d97',	'1 Frame',	150.00),
('e62d07965d71ee2d31595c7b37850042',	'6cab1c7e61e8e250b57475e4f6524b6d',	'80764fa7d3fad2a15e793e23adf503d8',	'Player A',	'1234567890',	'2026-07-04 17:37:20',	NULL,	'2026-07-04 18:37:20',	NULL,	NULL,	'active',	NULL,	0,	0.00,	'2026-07-04 12:07:20',	'91ab3949d02eabeb896ec299439622b3',	'a2599ee22ad34289a230683299bb8738',	'975be1aaf1e031a80c9291ad1e45646f',	'Hourly',	200.00),
('f282aa9f6ab80022a84d68e8c05de4a7',	'9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'Maulik',	'79901 16847',	'2026-05-20 23:40:50',	'2026-05-20 23:41:00',	NULL,	1.00,	200.00,	'completed',	NULL,	0,	0.00,	'2026-05-20 18:10:50',	'f077c24398dbeac6e090ef5749d453ab',	'4c3dfbd1f2cce470903e39d4c0bbb0c0',	'3935d346b61658ef1458efcc47fc824f',	'1 Frame',	120.00),
('fbabd43b5dc2c148c7450bd9b0c87cb9',	'f4304c2ace2370637fc58db919bd2ee9',	'67d3884ef2c65a0277342cb7219c0e17',	'Suhas',	'9173445963',	'2026-05-19 19:30:21',	'2026-05-19 19:30:48',	NULL,	1.00,	145.00,	'completed',	NULL,	0,	0.00,	'2026-05-19 14:00:21',	'99c3cd82ad076b22de5cb54a20536796',	'83e11f31da9ad5c7ca767f0318eb1924',	'27d7b1c9444eef3976125002c5421b14',	'1 Frame',	120.00);

CREATE TABLE `subscription_plans` (
  `id` char(36) NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `duration_days` int NOT NULL,
  `max_tables` int DEFAULT NULL,
  `is_trial` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `subscription_plans` (`id`, `name`, `price`, `duration_days`, `max_tables`, `is_trial`, `created_at`) VALUES
('basic-plan',	'Basic',	499.00,	30,	6,	0,	'2026-06-17 10:36:43'),
('pro-plan',	'Pro',	999.00,	30,	20,	0,	'2026-06-17 10:36:43'),
('trial-plan-id',	'Free Trial',	0.00,	10,	2,	1,	'2026-06-08 17:17:28');

CREATE TABLE `table_pricing` (
  `id` char(36) NOT NULL,
  `table_id` char(36) NOT NULL,
  `label` varchar(255) NOT NULL,
  `duration_minutes` int DEFAULT NULL,
  `frame_count` int DEFAULT NULL,
  `price` decimal(10,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `table_id` (`table_id`),
  CONSTRAINT `table_pricing_ibfk_1` FOREIGN KEY (`table_id`) REFERENCES `tables` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `table_pricing` (`id`, `table_id`, `label`, `duration_minutes`, `frame_count`, `price`, `created_at`) VALUES
('00b7bf6b31afa007939b1d00ef298c76',	'e1e1e97848d407509e59dd9062d94b4e',	'1 Frame',	0,	1,	120.00,	'2026-05-20 15:31:12'),
('1d44bb65026bc79a85cc96e496307d1e',	'764b2bb918e87eed54c1daf8f0d3ce5a',	'1 Frame',	0,	1,	120.00,	'2026-06-17 16:20:35'),
('22aa121d4bc0491c3a9adcb61c0aacee',	'79f88196e7f9a79b845bb37555e0efd8',	'1 Hour',	60,	0,	150.00,	'2026-05-20 15:30:58'),
('27d7b1c9444eef3976125002c5421b14',	'f4304c2ace2370637fc58db919bd2ee9',	'1 Frame',	0,	1,	120.00,	'2026-05-19 13:56:07'),
('286f5baca694606b6b3e015dc907c737',	'b9a07490c4f5891dd84aeda1dae0d06c',	'1 Hour',	60,	0,	160.00,	'2026-05-19 13:55:31'),
('2c9b3147dfa188e3d68b511baa434652',	'476a25bee19ba9471cce596557174340',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:23:40'),
('3935d346b61658ef1458efcc47fc824f',	'9538c054bc9c8539d11f2dfee01d7ba2',	'1 Frame',	0,	1,	120.00,	'2026-05-20 13:25:01'),
('3b16dffac7a8349f563088446ec40b5a',	'b9a07490c4f5891dd84aeda1dae0d06c',	'Half Hour',	30,	0,	80.00,	'2026-05-19 13:55:31'),
('3bc8f975d8849cc27434f78ab5a58362',	'1a3cb52383f6a8c5b860fa2f18b789e3',	'1 Hour',	60,	0,	150.00,	'2026-05-20 13:24:52'),
('3c470c7e8c8a5eaf67a33b5a76ef0a96',	'631a3e33a1810e92143c852bae01d53b',	'1 Frame',	0,	1,	120.00,	'2026-07-07 16:33:09'),
('476cd9b372979db9764082bc74bd3420',	'2c8ad9f18023af894da558aba9c47032',	'1 Frame',	0,	1,	120.00,	'2026-05-20 14:44:26'),
('57e244b9827e02ed358c89f1fa91c1b5',	'f3c32fddbb6b01a5110c98d8f7db7865',	'Half Hour',	30,	0,	80.00,	'2026-05-20 14:44:06'),
('5f07c79fba16004e74b7d42973d5c437',	'c0d25a696644cc9f10f886d0e442715c',	'Half Hour',	30,	0,	80.00,	'2026-06-17 14:08:39'),
('63a423d11fb1eb0cc874b10a382709c2',	'95dbe25a644ba57027be7f5a4d9194be',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:25:14'),
('76f69074a4d6e6cdae2a954fc128f8ef',	'1c85a37b5b4383eb43b80d877bde23d8',	'1 Hour',	60,	0,	150.00,	'2026-05-20 14:43:57'),
('7ba01c1a4a1339b092503a7a0f3d7506',	'1a3cb52383f6a8c5b860fa2f18b789e3',	'Half Hour',	30,	0,	80.00,	'2026-05-20 13:24:52'),
('9001518bffc99b62ea7ccf1948613e5e',	'ceaa6e8b88b0fe56e157534a1871e649',	'Half Hour',	30,	0,	80.00,	'2026-05-20 13:24:39'),
('975be1aaf1e031a80c9291ad1e45646f',	'6cab1c7e61e8e250b57475e4f6524b6d',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:07:19'),
('9ef701cbf98b98c1e5435b6e05f8f7e4',	'771aec17151d7acc930774236e34794a',	'1 Frame',	0,	1,	150.00,	'2026-07-03 06:54:51'),
('a9f06de7b103541dca743278fb1327ef',	'45894e1b55d64fdd56fe348be4142be9',	'1 Hour',	60,	0,	150.00,	'2026-05-20 15:31:05'),
('b242ccb02b257c60756ea817a5f2585c',	'25727fd1d957be0e8598d96e3dc94fdd',	'1 Frame',	0,	1,	120.00,	'2026-05-20 15:31:20'),
('b4ae18d36c9fd3abdea2be4e4808a6f3',	'1c85a37b5b4383eb43b80d877bde23d8',	'Half Hour',	30,	0,	80.00,	'2026-05-20 14:43:57'),
('bb57ecebc067372b66b8765ed1124876',	'b2c2fadc24ad40694f87f4eeb6326c62',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:08:33'),
('bf7432182f3d7b39accf3ee203af6a9d',	'bc1972bbb7b98b424ffc7f2c61518d9b',	'1 Frame',	0,	1,	150.00,	'2026-05-20 13:25:12'),
('c27aab822ba0278707af34e70204c348',	'1e45f7926aa655b1a96d6e6a7081e8b0',	'1 Frame',	0,	1,	120.00,	'2026-05-20 14:44:17'),
('c40ad2c2de62ca4090e260b3dbe53450',	'61716d2ee6d144ab742366b20e460bc6',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:24:59'),
('e03daee076ce5bbc6e4dc14200fd4c96',	'ceaa6e8b88b0fe56e157534a1871e649',	'1 Hour',	60,	0,	150.00,	'2026-05-20 13:24:39'),
('e1b7e339ca04cc4749f49c64b2236d95',	'f3c32fddbb6b01a5110c98d8f7db7865',	'1 Hour',	60,	0,	150.00,	'2026-05-20 14:44:06'),
('e2651fdb48c187500142b09adff00d97',	'f6ea09c3ef0432b2bd912e24a6fd5164',	'1 Frame',	0,	1,	150.00,	'2026-07-03 11:37:55'),
('e5294ac1749cee21984776fb495daa9d',	'03bad55f241533a74fe8b9cb9106c465',	'1 Frame',	0,	1,	100.00,	'2026-07-07 16:32:48'),
('ec8f0aa81d7fa9bb0d91318bc27c04e0',	'83f5ca5515284a0b89bbf98228ea2848',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:24:06'),
('edb933a3ce6c5153e85589529c64ca35',	'79f88196e7f9a79b845bb37555e0efd8',	'Half Hour',	30,	0,	80.00,	'2026-05-20 15:30:58'),
('f1a5c9e190979bfa69577f2cabe45fcd',	'45894e1b55d64fdd56fe348be4142be9',	'Half Hour',	30,	0,	80.00,	'2026-05-20 15:31:05'),
('f2cd5fe9ebf90bd04425fc6034ad56a7',	'e137dd674bba676448791c03600e8bc9',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:07:01'),
('f7071b927fb3150213876471c9745bea',	'2c38f8297959528f5812bb9632c515d0',	'1 Frame',	0,	1,	120.00,	'2026-05-19 13:55:53'),
('f73988088625bd851736b680db8a50cd',	'c0d25a696644cc9f10f886d0e442715c',	'1 Hour',	60,	0,	150.00,	'2026-06-17 14:08:39'),
('fa18446258c5a939ecb5ce43d88c7fb4',	'd98708a3e04db8b2dba00ac33080ec73',	'1 Frame',	0,	1,	100.00,	'2026-07-04 12:06:31');

CREATE TABLE `tables` (
  `id` char(36) NOT NULL,
  `owner_id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` enum('pool','snooker') DEFAULT NULL,
  `hourly_rate` decimal(10,2) NOT NULL,
  `status` enum('available','occupied','inactive') DEFAULT 'available',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `pricing_mode` enum('hourly','slab','frame') DEFAULT 'hourly',
  PRIMARY KEY (`id`),
  KEY `owner_id` (`owner_id`),
  CONSTRAINT `tables_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `tables` (`id`, `owner_id`, `name`, `type`, `hourly_rate`, `status`, `created_at`, `pricing_mode`) VALUES
('03bad55f241533a74fe8b9cb9106c465',	'990151bdc88dad0a008a2134fc9e4c86',	'S-1',	'snooker',	0.00,	'inactive',	'2026-07-07 16:32:48',	'frame'),
('1a3cb52383f6a8c5b860fa2f18b789e3',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'P-2',	'pool',	0.00,	'available',	'2026-05-20 13:24:51',	'slab'),
('1c85a37b5b4383eb43b80d877bde23d8',	'515cc966beb3db46b64594cbd896571d',	'p-1',	'pool',	0.00,	'available',	'2026-05-20 14:43:57',	'slab'),
('1e45f7926aa655b1a96d6e6a7081e8b0',	'515cc966beb3db46b64594cbd896571d',	's-1',	'snooker',	0.00,	'available',	'2026-05-20 14:44:17',	'frame'),
('25727fd1d957be0e8598d96e3dc94fdd',	'f79199f3bce6d22b6923babe4d1fbb7b',	'S-2',	'snooker',	0.00,	'available',	'2026-05-20 15:31:20',	'frame'),
('2c38f8297959528f5812bb9632c515d0',	'67d3884ef2c65a0277342cb7219c0e17',	'S-1',	'snooker',	0.00,	'available',	'2026-05-19 13:55:53',	'frame'),
('2c8ad9f18023af894da558aba9c47032',	'515cc966beb3db46b64594cbd896571d',	's-2',	'snooker',	0.00,	'available',	'2026-05-20 14:44:26',	'frame'),
('2ce796fd7cf90bb682e9da420d1ef64e',	'c68e8ceb05c5bcc55645c30896cc15b2',	'Snooker Table 1',	'snooker',	200.00,	'available',	'2026-07-04 12:06:08',	'hourly'),
('45894e1b55d64fdd56fe348be4142be9',	'f79199f3bce6d22b6923babe4d1fbb7b',	'P-2',	'pool',	0.00,	'available',	'2026-05-20 15:31:05',	'slab'),
('476a25bee19ba9471cce596557174340',	'fa02e12b66788a979c2d2f6d988ef1e8',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:23:40',	'hourly'),
('61716d2ee6d144ab742366b20e460bc6',	'26addc76c9bbc8790175ae5913ed2da1',	'Snooker Table 1',	'snooker',	200.00,	'available',	'2026-07-04 12:24:59',	'hourly'),
('631a3e33a1810e92143c852bae01d53b',	'990151bdc88dad0a008a2134fc9e4c86',	'S-2',	'snooker',	0.00,	'occupied',	'2026-07-07 16:33:09',	'frame'),
('6cab1c7e61e8e250b57475e4f6524b6d',	'80764fa7d3fad2a15e793e23adf503d8',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:07:18',	'hourly'),
('764b2bb918e87eed54c1daf8f0d3ce5a',	'990151bdc88dad0a008a2134fc9e4c86',	'S-1',	'snooker',	0.00,	'occupied',	'2026-06-17 16:20:35',	'frame'),
('771aec17151d7acc930774236e34794a',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'S-1',	'snooker',	0.00,	'occupied',	'2026-07-03 06:54:50',	'frame'),
('79f88196e7f9a79b845bb37555e0efd8',	'f79199f3bce6d22b6923babe4d1fbb7b',	'P-1',	'pool',	0.00,	'available',	'2026-05-20 15:30:58',	'slab'),
('83f5ca5515284a0b89bbf98228ea2848',	'42f9062a60cbfb0c55f1ea78e618a459',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:24:06',	'hourly'),
('9538c054bc9c8539d11f2dfee01d7ba2',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'S-1',	'snooker',	0.00,	'available',	'2026-05-20 13:25:01',	'frame'),
('95dbe25a644ba57027be7f5a4d9194be',	'b7caca4e30079dd79663fdfc4fcf11b8',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:25:14',	'hourly'),
('b2c2fadc24ad40694f87f4eeb6326c62',	'3d5d462baa28d208c661abc8ef1cc5bd',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:08:33',	'hourly'),
('b9a07490c4f5891dd84aeda1dae0d06c',	'67d3884ef2c65a0277342cb7219c0e17',	'P-1',	'pool',	0.00,	'occupied',	'2026-05-19 13:55:31',	'slab'),
('bc1972bbb7b98b424ffc7f2c61518d9b',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'S-2',	'snooker',	0.00,	'available',	'2026-05-20 13:25:12',	'frame'),
('c0d25a696644cc9f10f886d0e442715c',	'990151bdc88dad0a008a2134fc9e4c86',	'P-1',	'pool',	0.00,	'available',	'2026-06-17 14:08:39',	'slab'),
('ceaa6e8b88b0fe56e157534a1871e649',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'P-1',	'pool',	0.00,	'available',	'2026-05-20 13:24:39',	'slab'),
('d98708a3e04db8b2dba00ac33080ec73',	'bf6c9dfe4eda14ec4e58eee61cd9373f',	'Snooker Table 1',	'snooker',	200.00,	'available',	'2026-07-04 12:06:31',	'hourly'),
('e137dd674bba676448791c03600e8bc9',	'623dea88515a6339ffad62ef2febfe6f',	'Snooker Table 1',	'snooker',	200.00,	'occupied',	'2026-07-04 12:07:00',	'hourly'),
('e1e1e97848d407509e59dd9062d94b4e',	'f79199f3bce6d22b6923babe4d1fbb7b',	'S-1',	'snooker',	0.00,	'available',	'2026-05-20 15:31:11',	'frame'),
('f3c32fddbb6b01a5110c98d8f7db7865',	'515cc966beb3db46b64594cbd896571d',	'p-2',	'pool',	0.00,	'available',	'2026-05-20 14:44:06',	'slab'),
('f4304c2ace2370637fc58db919bd2ee9',	'67d3884ef2c65a0277342cb7219c0e17',	'S-2',	'snooker',	0.00,	'available',	'2026-05-19 13:56:07',	'frame'),
('f6ea09c3ef0432b2bd912e24a6fd5164',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'S-1',	'snooker',	0.00,	'available',	'2026-07-03 11:37:55',	'frame');

CREATE TABLE `transactions` (
  `id` char(36) NOT NULL,
  `owner_id` char(36) NOT NULL,
  `customer_id` char(36) NOT NULL,
  `session_id` char(36) DEFAULT NULL,
  `type` enum('game','item','payment') NOT NULL,
  `payment_method` enum('cash','online') DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `note` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `owner_id` (`owner_id`),
  KEY `customer_id` (`customer_id`),
  CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `transactions` (`id`, `owner_id`, `customer_id`, `session_id`, `type`, `payment_method`, `amount`, `note`, `created_at`) VALUES
('0031b8bc21f3cb0fba90a40fa41dc422',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	NULL,	'payment',	'cash',	200.00,	'Ledger Payment',	'2026-05-20 14:48:08'),
('00d79d208ee07695a78c5950782c615a',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 14:14:36'),
('01cd617961756c1317a9e85fc0ef7e56',	'f79199f3bce6d22b6923babe4d1fbb7b',	'885269856f2cab3ee5f45421936bf05b',	'9637e4120466ffd10b74b3a846582679',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 15:33:52'),
('0db3760c6ef8d0ca3411d44182bfc2e4',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'2dbc3c2d809f16dd36e8303eaefcf967',	'33304db3bb4c5dfde23ae5aa51955f9d',	'payment',	'cash',	190.00,	NULL,	'2026-07-03 07:08:51'),
('1ca03d91cb3fa85b4b832bc5965f3fa7',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'c66a4b67c041ed06c51fc71159727cb7',	'payment',	'online',	185.00,	NULL,	'2026-05-19 13:57:51'),
('2b00d5f9a09ccfb3a3c32a6b869cbafe',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'403c52cf1316a5ee7745d1c11487b10e',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 18:10:05'),
('2c5650114e7701e23bddb156298ae763',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'8824010e6f7f5837537dba92d74593d2',	'item',	NULL,	150.00,	'',	'2026-05-20 17:58:18'),
('2ec225ac5392e7f2a4d198bbb14d052d',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'2ece10195cb12a84049bf95c06aac76b',	'game',	NULL,	150.00,	'1 Frame',	'2026-07-03 12:01:42'),
('2fd7b764db6d33631ab20465f7536983',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'ace541547a35a81084143d53fc86dbca',	'377f295a475a0d37b4265144d28392b1',	'item',	NULL,	150.00,	'',	'2026-05-20 13:50:44'),
('32532e8b2fdeb58e44d0e6149601b991',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'a26469e6396ea616ed05ca9108efb412',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 17:55:13'),
('331829f4bbe1a40b0468afdaa7266626',	'f4dabaf9bdd241490b66fee8ce4002ad',	'dca16dca32277278cd2b0320aaa06446',	NULL,	'item',	NULL,	20.00,	'Xhjc x1 @ 20.00',	'2026-06-17 14:07:46'),
('3b55edc477855bdf097bf633ad7d2f9d',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'ace541547a35a81084143d53fc86dbca',	NULL,	'payment',	'cash',	150.00,	'Ledger Payment',	'2026-05-20 13:51:03'),
('3fe96996de45f92fdc8feabb3492cc29',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'cash',	200.00,	'Ledger Payment',	'2026-05-20 14:50:09'),
('404ce5381489fb76ccd817926af1afff',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'4965767f240949c642e2485e12bc590c',	'payment',	'cash',	100.00,	NULL,	'2026-07-10 10:42:15'),
('40f8459506d91542813e1f59167c003e',	'f79199f3bce6d22b6923babe4d1fbb7b',	'885269856f2cab3ee5f45421936bf05b',	'9637e4120466ffd10b74b3a846582679',	'item',	NULL,	20.00,	'Raj',	'2026-05-20 15:33:52'),
('420188a1c1b43eeac8952012aa704bfd',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'd83b31ca19152d4afe60eed59a2d7131',	'item',	NULL,	150.00,	'',	'2026-05-20 14:49:58'),
('4264ec8036f4ac25abec7b4468915d2a',	'515cc966beb3db46b64594cbd896571d',	'9291c481550677e14531430accf8a1cc',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 14:46:18'),
('44f55646c22eaf5676b9c53d96edf5a8',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'ace541547a35a81084143d53fc86dbca',	'377f295a475a0d37b4265144d28392b1',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-20 13:50:44'),
('461ee9fe520327ca6d4634ab57726a81',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 13:50:13'),
('4727b8c231578fd419a14466a1e7df74',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'2ece10195cb12a84049bf95c06aac76b',	'item',	NULL,	40.00,	'Coke',	'2026-07-03 12:01:42'),
('4daaef33954c77365b15266763b6e937',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'8824010e6f7f5837537dba92d74593d2',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 17:58:18'),
('4f2476cb4e66a4746f586d33c05e965e',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'd83b31ca19152d4afe60eed59a2d7131',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 14:49:58'),
('50fc3c0dfa1ebecd6e0e9649e6056011',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'0db96d8f837a268736ca9659558c19a3',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-20 14:47:48'),
('54cf45e2fc8cf2f267e7a12d5d51566b',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'cash',	99.00,	'Ledger Payment',	'2026-05-20 13:47:20'),
('587956e9c4e75ca3cb9a151c7a1a3f14',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'49ed285d189ddd27de67dea6e819b905',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 15:41:00'),
('5d7e9d104fa62b5b374f667adf8e8a4e',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'f077c24398dbeac6e090ef5749d453ab',	'f282aa9f6ab80022a84d68e8c05de4a7',	'item',	NULL,	80.00,	'',	'2026-05-20 18:11:00'),
('6372de7ea08bdaaefea46e7b745cd986',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'af272bf86cd32235eba0c0c9c9cf587e',	'item',	NULL,	20.00,	'coke',	'2026-05-20 13:39:34'),
('663c5b67a3679e6599c6e7a01d947be5',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'f077c24398dbeac6e090ef5749d453ab',	'f282aa9f6ab80022a84d68e8c05de4a7',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 18:11:00'),
('6a7e4aca6077ad842798809da85f83a3',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'2b21f46e7ba72bc0b4318727189757e9',	'item',	NULL,	120.00,	'',	'2026-05-20 13:49:23'),
('6b518125c5204b7d75cb6406af4be7e1',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'14610015f46797f479012f5bcf1c57c4',	'game',	NULL,	120.00,	'1 Frame',	'2026-07-07 10:27:32'),
('6c9bd6c734cc2106089fcddd60d8001d',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'0db96d8f837a268736ca9659558c19a3',	'item',	NULL,	150.00,	'coke',	'2026-05-20 14:47:48'),
('7e4d26055d5ab6b069074500a4962e41',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 13:49:42'),
('7e958a408df0f523a6266e2432a2db2a',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'0a0341d6def994a82d25f1407ade4bad',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 13:46:53'),
('7f4b0ef6d296b8ee1f612803f1c66dc4',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'75bd65784212be957810a61298456205',	'4965767f240949c642e2485e12bc590c',	'game',	NULL,	150.00,	'1 Frame',	'2026-07-10 10:42:15'),
('82a47ccff2579e96de6e64155c48e3e5',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'1b0277515bb74fea18cd3d1d1f879f14',	NULL,	'payment',	'online',	100.00,	'Ledger Payment',	'2026-05-21 09:28:23'),
('849b98ad893af32242af878f9ca937ae',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'2dbc3c2d809f16dd36e8303eaefcf967',	'33304db3bb4c5dfde23ae5aa51955f9d',	'game',	NULL,	150.00,	'1 Frame',	'2026-07-03 07:08:51'),
('84f4f829db2063577248e5e96d613a58',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'2b21f46e7ba72bc0b4318727189757e9',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 13:49:23'),
('86be930c30489435bad45d8690ac1219',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'6bdd84125d52bf121bc54e5ebdc05419',	'payment',	'cash',	80.00,	NULL,	'2026-06-17 16:05:44'),
('8a05b69f717c7b993be95b1b3302af21',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'1b0277515bb74fea18cd3d1d1f879f14',	'4f35caaff7c60ff62bdccc2ad2253ab4',	'item',	NULL,	18.00,	'cigarate',	'2026-05-21 09:28:10'),
('8fa8df6af34c2c03a1caebb598af1727',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'af272bf86cd32235eba0c0c9c9cf587e',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-20 13:39:34'),
('a8bda5bb8b20fabacd7ccdc9bc6de80b',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	'a26469e6396ea616ed05ca9108efb412',	'item',	NULL,	150.00,	'',	'2026-05-20 17:55:13'),
('ad6f48ae6952316dee5bbd162b6218c2',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'd7bb082d19f52ba4c5f8e24c02b1c260',	'payment',	'online',	150.00,	NULL,	'2026-05-20 14:45:41'),
('afbed1c39f7038a93427bc566cf63e1f',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'fbabd43b5dc2c148c7450bd9b0c87cb9',	'item',	NULL,	25.00,	'',	'2026-05-19 14:00:48'),
('afc8fa25e921ab38dde7f9df0b0ffd21',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'c5a01ab685591d83234be8a5f82d5e7c',	'game',	NULL,	80.00,	'Half Hour',	'2026-05-20 14:10:49'),
('b504657fd610cdf9309537d5edb73c8a',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'fbabd43b5dc2c148c7450bd9b0c87cb9',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-19 14:00:48'),
('d2db799afeafab7b2b4a2b1535dc3a3d',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'c66a4b67c041ed06c51fc71159727cb7',	'item',	NULL,	25.00,	'',	'2026-05-19 13:57:51'),
('d2ea177bb7d0fc9c2c41931bf15f04be',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'1b0277515bb74fea18cd3d1d1f879f14',	'4f35caaff7c60ff62bdccc2ad2253ab4',	'item',	NULL,	35.00,	'Masalo',	'2026-05-21 09:28:10'),
('d4aa1ac7d5230996007edbc50addf00f',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	'd7bb082d19f52ba4c5f8e24c02b1c260',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-20 14:45:41'),
('d5048174b8a3df9759678b7919713862',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	'6bdd84125d52bf121bc54e5ebdc05419',	'game',	NULL,	80.00,	'Half Hour',	'2026-06-17 16:05:44'),
('d921de5fa8f0a0a32ebec091ddab01ed',	'67d3884ef2c65a0277342cb7219c0e17',	'99c3cd82ad076b22de5cb54a20536796',	'c66a4b67c041ed06c51fc71159727cb7',	'game',	NULL,	160.00,	'1 Hour',	'2026-05-19 13:57:51'),
('dff367a48a959c2613d9767f34a3bc0e',	'f79199f3bce6d22b6923babe4d1fbb7b',	'76d1fa84e1788cfdd0d35f5b1af0e7a4',	NULL,	'payment',	'online',	50.00,	'Ledger Payment',	'2026-05-20 15:45:37'),
('e2fe046ab234b4e530e1cb1436f77986',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'ae713499135bfce84af6e4fb5905fac5',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-20 14:14:18'),
('e8fe11dc98269bc7511997feae766828',	'515cc966beb3db46b64594cbd896571d',	'cc825f88c3e4280d638350009d59102d',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 14:49:25'),
('eeee89aefe1b6736493ecbdc985b7ab7',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'1b0277515bb74fea18cd3d1d1f879f14',	'4f35caaff7c60ff62bdccc2ad2253ab4',	'game',	NULL,	150.00,	'1 Hour',	'2026-05-21 09:28:10'),
('ef85aff0809584e9a4dc30bd6be0a21e',	'515cc966beb3db46b64594cbd896571d',	'9291c481550677e14531430accf8a1cc',	'25505371c81f84faffa31306f151d83b',	'game',	NULL,	120.00,	'1 Frame',	'2026-05-20 14:46:02'),
('f0fbf2920fc1bad7ede607ef6ffb1ad6',	'f79199f3bce6d22b6923babe4d1fbb7b',	'885269856f2cab3ee5f45421936bf05b',	NULL,	'payment',	'cash',	100.00,	'Ledger Payment',	'2026-05-20 15:35:11'),
('f1dc32903d418b64ae411cf9fd4b3f4d',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	NULL,	'payment',	'online',	21.00,	'Ledger Payment',	'2026-05-20 13:47:48'),
('f4d06952315a3b5348859899ad2d8bc2',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'2dbc3c2d809f16dd36e8303eaefcf967',	'33304db3bb4c5dfde23ae5aa51955f9d',	'item',	NULL,	40.00,	'Coke',	'2026-07-03 07:08:51'),
('f79e693474a4e0ed520bb8510b656ed8',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'38a28113ef97287031657247cc5548f2',	'403c52cf1316a5ee7745d1c11487b10e',	'item',	NULL,	150.00,	'',	'2026-05-20 18:10:05'),
('fc8e35d998c80a9606a6641d06efeb79',	'990151bdc88dad0a008a2134fc9e4c86',	'a8fc52affda0133f466001160cdd77e8',	NULL,	'item',	NULL,	10.00,	'Demo x1 @ 10.00',	'2026-06-17 14:21:45'),
('fe8a575fb42572d282caf6c790569f9c',	'84f64f7b9dccd73f98060a3fc3a21f3c',	'a619d97937567a1cdc3a1c073d22f52f',	'af272bf86cd32235eba0c0c9c9cf587e',	'payment',	'cash',	170.00,	NULL,	'2026-05-20 13:39:34');

CREATE TABLE `user_subscriptions` (
  `id` char(36) NOT NULL,
  `user_id` char(36) NOT NULL,
  `plan_id` char(36) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `status` enum('active','expired','cancelled') DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `plan_id` (`plan_id`),
  CONSTRAINT `user_subscriptions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `user_subscriptions_ibfk_2` FOREIGN KEY (`plan_id`) REFERENCES `subscription_plans` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `user_subscriptions` (`id`, `user_id`, `plan_id`, `start_date`, `end_date`, `status`, `created_at`) VALUES
('025e4b6c01895cfc2046e9e282a6a814',	'2165d2a01ff0e1f30573bb4c46b76b31',	'trial-plan-id',	'2026-06-17 15:17:53',	'2026-06-27 15:17:53',	'active',	'2026-06-17 09:47:53'),
('08d493e3db53fe792dec9a3f547d6ac7',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'2026-06-17 18:54:48',	'2026-07-17 18:54:48',	'active',	'2026-06-17 13:24:48'),
('17d0f7a9837ccd46005365ea88dbf429',	'623dea88515a6339ffad62ef2febfe6f',	'trial-plan-id',	'2026-07-04 17:37:00',	'2026-07-14 17:37:00',	'active',	'2026-07-04 12:07:00'),
('30119a2ef949623760a840df39c11eb6',	'3d5d462baa28d208c661abc8ef1cc5bd',	'trial-plan-id',	'2026-07-04 17:38:32',	'2026-07-14 17:38:32',	'active',	'2026-07-04 12:08:32'),
('3293cda33f9421443f0104f7bb15e3f5',	'f4dabaf9bdd241490b66fee8ce4002ad',	'pro-plan',	'2026-06-17 18:01:44',	'2026-07-17 18:01:44',	'active',	'2026-06-17 12:31:44'),
('386db4b9ae2b589713b31c9c0b5f3c04',	'9502354d87b71c98dbaf6e8a26245e1b',	'trial-plan-id',	'2026-06-17 16:24:16',	'2026-06-27 16:24:16',	'active',	'2026-06-17 10:54:16'),
('5129b50916988cd654c6b5e83155aa1e',	'26addc76c9bbc8790175ae5913ed2da1',	'trial-plan-id',	'2026-07-04 17:54:58',	'2026-07-14 17:54:58',	'active',	'2026-07-04 12:24:58'),
('52ed04fb0237815fe472274b2ec71f77',	'f4dabaf9bdd241490b66fee8ce4002ad',	'trial-plan-id',	'2026-06-17 17:49:52',	'2026-06-27 17:49:52',	'expired',	'2026-06-17 12:19:52'),
('53d08d390bf9d678b1eee08c0c8c3d32',	'f4dabaf9bdd241490b66fee8ce4002ad',	'basic-plan',	'2026-06-17 17:58:28',	'2026-07-17 17:58:28',	'expired',	'2026-06-17 12:28:28'),
('55742a605a93e32665d8f8d8de966fe7',	'fa02e12b66788a979c2d2f6d988ef1e8',	'trial-plan-id',	'2026-07-04 17:53:39',	'2026-07-14 17:53:39',	'active',	'2026-07-04 12:23:39'),
('764664dbf0ed74af6374bbfedd2af632',	'990151bdc88dad0a008a2134fc9e4c86',	'trial-plan-id',	'2026-06-17 17:50:29',	'2026-06-27 17:50:29',	'expired',	'2026-06-17 12:20:29'),
('895786ef765f65bbbff14ee449715cde',	'990151bdc88dad0a008a2134fc9e4c86',	'basic-plan',	'2026-06-17 18:20:30',	'2026-07-17 18:20:30',	'expired',	'2026-06-17 12:50:30'),
('8a97b81b7ba57cf5d78b48aa5fe366dc',	'f4cd67737d3891053d665022ac731ace',	'trial-plan-id',	'2026-06-17 16:46:03',	'2026-06-27 16:46:03',	'active',	'2026-06-17 11:16:03'),
('8c1b0b6a297dec7e478e46ba3c2fa0b4',	'098a765a38ba6b4e4a966efbcdf6c2ef',	'trial-plan-id',	'2026-07-03 11:58:30',	'2026-07-13 11:58:30',	'active',	'2026-07-03 06:28:30'),
('9d490cc83aca60a54bef9c48b9b0cf20',	'bf6c9dfe4eda14ec4e58eee61cd9373f',	'trial-plan-id',	'2026-07-04 17:36:30',	'2026-07-14 17:36:30',	'active',	'2026-07-04 12:06:30'),
('9fe936e4a3d3f1ae6da968c9c8f49a4b',	'c68e8ceb05c5bcc55645c30896cc15b2',	'trial-plan-id',	'2026-07-04 17:36:07',	'2026-07-14 17:36:07',	'active',	'2026-07-04 12:06:07'),
('c23e175c7e63fae8975a72d0b6799d5e',	'42f9062a60cbfb0c55f1ea78e618a459',	'trial-plan-id',	'2026-07-04 17:54:05',	'2026-07-14 17:54:05',	'active',	'2026-07-04 12:24:05'),
('c2f9389ad7747892fbd6cc0aa95b2771',	'b7caca4e30079dd79663fdfc4fcf11b8',	'trial-plan-id',	'2026-07-04 17:55:13',	'2026-07-14 17:55:13',	'active',	'2026-07-04 12:25:13'),
('c659891e68c8fc6fc4b391dd82cad204',	'332951920e4097e3d5355c775959f09b',	'trial-plan-id',	'2026-06-17 16:26:28',	'2026-06-27 16:26:28',	'active',	'2026-06-17 10:56:28'),
('ee99fc0bd8e6bbf51fe2cbd81dd9cf4d',	'f4dabaf9bdd241490b66fee8ce4002ad',	'basic-plan',	'2026-06-17 18:00:11',	'2026-07-17 18:00:11',	'expired',	'2026-06-17 12:30:11'),
('fad34a29a3507081845b5bb0cac97d9b',	'80764fa7d3fad2a15e793e23adf503d8',	'trial-plan-id',	'2026-07-04 17:37:17',	'2026-07-14 17:37:17',	'active',	'2026-07-04 12:07:17');

CREATE TABLE `users` (
  `id` char(36) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `shop_name` varchar(255) DEFAULT NULL,
  `max_tables` int NOT NULL DEFAULT '6',
  `is_blocked` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `trial_used` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `users` (`id`, `email`, `password`, `shop_name`, `max_tables`, `is_blocked`, `created_at`, `trial_used`) VALUES
('02d4e78e10ac5f7a5123b938c4570e63',	'12@test.com',	'$2y$10$k9YvFd8ujdyj60MRb/X4iuTV1Zcmv9pAqFr0ZsETSarHb1bA7IuVW',	'Test Shop',	6,	0,	'2026-05-26 00:51:24',	0),
('098a765a38ba6b4e4a966efbcdf6c2ef',	'suhas@suhas.com',	'$2y$10$IiPGPuwn1gcg525v2me1TuhvIuKyG4LDJsPapz7jj3AsL10VWlDI.',	'Suhas',	4,	0,	'2026-07-03 06:28:30',	1),
('0a803bef979721b6a234e5912a698be5',	'123@gmail.com',	'$2y$10$Ap7aGES/jwDEqYJPPk6dbO1xJIm/nR67EiyKhUor35rEEsZRr9Rs6',	'Suhas',	4,	1,	'2026-05-20 14:29:50',	0),
('14291b41f2a15533c2461b66300d3fe0',	'owners@test.com',	'$2y$10$mtEmLNnAUbX1.vJSLbL8G.qOtZosq0CE8LXLSkEXa0BWA/zu2Nfd2',	'ABC Snooker Club',	2,	0,	'2026-06-10 09:35:08',	1),
('2165d2a01ff0e1f30573bb4c46b76b31',	'abc@gnail.com',	'$2y$10$3e.X/gECCQfHoSTwS0uaQeQ0oondk/DHvOA/NfFJU9VitTaLxbKBe',	'Abc',	4,	0,	'2026-06-17 09:47:53',	1),
('26addc76c9bbc8790175ae5913ed2da1',	'test_1783167898722@example.com',	'$2y$10$OerlQT7zyt3GsKdborMFDOsa5Qw2vy2qqdVgdQqi0pbyDb3rpSkIu',	'Test Snooker Club',	4,	0,	'2026-07-04 12:24:58',	1),
('332951920e4097e3d5355c775959f09b',	'ab1@gmail.com',	'$2y$10$EkNFhReckbQcbqcyCY0pluT9e0cxbP4wtUFelJrLelzH9qsCGhPUW',	'Abc',	4,	0,	'2026-06-17 10:56:28',	1),
('39916c4f9094c47993514e35ac7c16cd',	'demo@demomc.com',	'$2y$10$0qZF1diQv3Qn5UgTMk/QtOF0LPOSNFwxNJ5vQHtNwGf3UA/hb5mmm',	'Demo',	4,	0,	'2026-06-12 04:51:58',	0),
('3d5d462baa28d208c661abc8ef1cc5bd',	'test_1783166912694@example.com',	'$2y$10$ghhdwDUUi5AFOcaL/SH23ur4L1vl9TIZVMvVGs9GQo9xEVj3.BZrS',	'Test Snooker Club',	4,	0,	'2026-07-04 12:08:32',	1),
('42f9062a60cbfb0c55f1ea78e618a459',	'test_1783167844381@example.com',	'$2y$10$f0ws4EpV22KsUTTeXDu0YeCiR3eOhS/EtN7PzYrMnQ29vwWd7yhCS',	'Test Snooker Club',	4,	0,	'2026-07-04 12:24:05',	1),
('515cc966beb3db46b64594cbd896571d',	'testuser@gmail.com',	'$2y$10$76d7.x2zEntT35s2ndlgL.5beH4FdziTH6WUyZVWZ9R8uy46VOoRG',	'Test',	4,	0,	'2026-05-20 14:43:19',	0),
('5335ee0402a3f8a460283ce82e67865f',	'suhas@gmail.com',	'$2y$10$l6vYfQHMQYjuPk..zmKcYu1GgMGeLCZ8XtJvV/xV0VmqjYSna96UO',	'Xyz',	2,	0,	'2026-06-11 17:41:16',	1),
('623dea88515a6339ffad62ef2febfe6f',	'test_1783166819589@example.com',	'$2y$10$j9boSwr.v3sBjfvhPqu5rOpywKFS8JBdTaz3aWfEjpj3zFuwuO7aq',	'Test Snooker Club',	4,	0,	'2026-07-04 12:07:00',	1),
('67d3884ef2c65a0277342cb7219c0e17',	'pool@gmail.com',	'$2y$10$5vz.I8jSGZairoKv9adZt.Q7NPjhG5jyB9NHSHKCoYRP1DFN0Av/O',	'Pool Master',	6,	0,	'2026-05-19 13:17:31',	0),
('6deb0740724f790a96121420715011b0',	'abc@gmail.com',	'$2y$10$F1HWUpOnSBhiJMfvvFJfKeS2w2/RIF2wvyuLcbDnH9YLe/KYxJTD6',	'Abc',	2,	0,	'2026-06-11 17:40:00',	1),
('76d1d0eba1d5d99870d0a17ca8e5826d',	'owner@test.com',	'$2y$10$oDOhck5znDuiQv1pFUNMGul9/lQkyv.A87ITRsxJtCf7Wbz2wT1Q2',	'ABC Snooker Club',	2,	0,	'2026-06-10 09:34:39',	1),
('7ce1155240317eb6f5087994047a6ef9',	'owsners@test.com',	'$2y$10$0r6giRXrU7wP6KexG/7bAef5BPxUA.Gtc7ta4Xhf1yfTz8ipxslgS',	'ABC Snooker Club',	2,	0,	'2026-06-10 09:36:10',	1),
('80764fa7d3fad2a15e793e23adf503d8',	'test_1783166836635@example.com',	'$2y$10$TRDWzolVuieiQGX6AV0QXuNatT73t6pg1eDYXfPtW911U3cl8Oc/W',	'Test Snooker Club',	4,	0,	'2026-07-04 12:07:17',	1),
('84f64f7b9dccd73f98060a3fc3a21f3c',	'test@test.com',	'$2y$10$pBhXVENa1/8zZq3O6/Ks9OAYdMMqS.U/cEPiehMJqumLWsnpSUAkC',	'Mahi Test',	6,	0,	'2026-05-19 13:24:47',	0),
('87a8cd126ae37d91cf647ee14a38adcb',	'mahipool12@gmail.com',	'$2y$10$2aeHbEfTTNmRctF8CYGgvuGLxLZ2yQF7B1hfUAxOv2CCVAGMg5Fee',	'Mahi Pool',	5,	0,	'2026-06-01 10:00:29',	0),
('8c1b99e16aaafc466dfc4f16c0c4cac8',	'abc@abc.com',	'$2y$10$gV4oVp6fjWwbAqz0g798Y.SB6dN4x4YX3RER.At7qpQiGEM2wq4oO',	'Abc',	2,	0,	'2026-06-11 17:45:52',	1),
('9502354d87b71c98dbaf6e8a26245e1b',	'ab@gmail.com',	'$2y$10$ZwcSr3D2LqKaZhTHNWVwn.o7CAnhEz3V4KFVNGMz2Fj9tChPNcNwG',	'Abc',	4,	0,	'2026-06-17 10:54:16',	1),
('990151bdc88dad0a008a2134fc9e4c86',	'kaklottarmaulik12@gmail.com',	'$2y$10$L7O4bcUn.Ln/HU4iLEu8a.IY7nhC1CRp6GJvtK3MVW7vkaqupsjku',	'Test',	4,	0,	'2026-06-17 12:20:29',	1),
('b7caca4e30079dd79663fdfc4fcf11b8',	'test_1783167913738@example.com',	'$2y$10$B4OvGY42ZkX8Fc5sHBh9FuQ8MbZc5LRQusmhiospUu077Afv9ilqC',	'Test Snooker Club',	4,	0,	'2026-07-04 12:25:13',	1),
('bf6c9dfe4eda14ec4e58eee61cd9373f',	'test_1783166790580@example.com',	'$2y$10$Ba4K9mtgty2kFs.ZpeTGZ.tgx1vLNaWZPHW4gZZzfCiw1u5qamF9W',	'Test Snooker Club',	4,	0,	'2026-07-04 12:06:30',	1),
('c68e8ceb05c5bcc55645c30896cc15b2',	'test_1783166767631@example.com',	'$2y$10$PLsiD5doOpzxvH.ngnALSey6wltfob2A9wvtSTcQkGmz9XePKuWlu',	'Test Snooker Club',	4,	0,	'2026-07-04 12:06:07',	1),
('d064973a29a0a8ebf937d5ce1e793d5b',	'xyz@xyz.com',	'$2y$10$9RBYydqxQhZuRivn4JiMnOYx/aaef3gLCWUrS0QQo7EoLgQpzRWem',	'Xyz',	2,	0,	'2026-06-17 05:19:07',	1),
('f4cd67737d3891053d665022ac731ace',	'test1@test.com',	'$2y$10$6J3LO8M2gntTBlaUyIpANeeO7YVBdGMq1BsZc.imbWzfO9NPf5DXy',	'ABC Snooker Club',	4,	0,	'2026-06-17 11:16:03',	1),
('f4dabaf9bdd241490b66fee8ce4002ad',	'suhas1@gmail.com',	'$2y$10$gaygA2Rlk0.TqoJ8mqRXuuxinwkGoWMLGluYqKvw0Hjq16zHASl96',	'Suhaz',	4,	0,	'2026-06-17 12:19:52',	1),
('f79199f3bce6d22b6923babe4d1fbb7b',	'players@gmail.com',	'$2y$10$IOcCqk9i1eDJbYsYYLcYF.AudzyLobmidHaH4CWdIk.0rxhpN5A9y',	'Players Pool',	4,	0,	'2026-05-20 15:30:37',	0),
('fa02e12b66788a979c2d2f6d988ef1e8',	'test_1783167818688@example.com',	'$2y$10$/Hhgx1htonnL/.tFxzbjl.KRYX3cWiY3mYGx0/1MJFgUqaS7LhczW',	'Test Snooker Club',	4,	0,	'2026-07-04 12:23:39',	1);

-- 2026-07-10 10:50:56 UTC
