-- SQL Dump for utqgpyjt_45win8279
-- Generated on 2026-09-02 13:22:49

SET FOREIGN_KEY_CHECKS=0;

DROP TABLE IF EXISTS admin;
CREATE TABLE `admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(100) NOT NULL,
  `role` enum('super_admin','admin','moderator') DEFAULT 'admin',
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO admin VALUES ('1','admin','$2y$10$AJGdsrxki.ZyNo8H/pkQSOOeNpMLFvKlMz0f0FAgGri6Xn7NtTYvS','admin@gamehub.com','super_admin','2026-02-28 06:21:23');

DROP TABLE IF EXISTS aviator_history;
CREATE TABLE `aviator_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `crash_point` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=297 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO aviator_history VALUES ('1','9.67','2026-03-05 09:21:06');
INSERT INTO aviator_history VALUES ('2','1.17','2026-03-05 09:21:18');
INSERT INTO aviator_history VALUES ('3','1.25','2026-03-05 09:21:30');
INSERT INTO aviator_history VALUES ('4','1.50','2026-03-05 09:21:46');
INSERT INTO aviator_history VALUES ('5','7.87','2026-03-05 09:22:22');
INSERT INTO aviator_history VALUES ('6','1.03','2026-03-05 09:22:32');
INSERT INTO aviator_history VALUES ('7','7.69','2026-03-05 09:23:08');
INSERT INTO aviator_history VALUES ('8','15.18','2026-03-05 09:24:18');
INSERT INTO aviator_history VALUES ('9','5.17','2026-03-05 09:24:49');
INSERT INTO aviator_history VALUES ('10','2.96','2026-03-05 09:25:11');
INSERT INTO aviator_history VALUES ('11','1.55','2026-03-05 09:25:26');
INSERT INTO aviator_history VALUES ('12','1.61','2026-03-05 09:25:42');
INSERT INTO aviator_history VALUES ('13','1.45','2026-03-05 09:25:56');
INSERT INTO aviator_history VALUES ('14','20.82','2026-03-05 09:26:44');
INSERT INTO aviator_history VALUES ('15','2.01','2026-03-05 09:27:02');
INSERT INTO aviator_history VALUES ('16','2.10','2026-03-05 09:27:22');
INSERT INTO aviator_history VALUES ('17','1.49','2026-03-05 09:27:38');
INSERT INTO aviator_history VALUES ('18','1.40','2026-03-05 09:27:52');
INSERT INTO aviator_history VALUES ('19','6.27','2026-03-05 09:28:24');
INSERT INTO aviator_history VALUES ('20','7.14','2026-03-05 09:28:58');
INSERT INTO aviator_history VALUES ('21','1.18','2026-03-05 09:29:11');
INSERT INTO aviator_history VALUES ('22','26.77','2026-03-05 09:30:04');
INSERT INTO aviator_history VALUES ('23','1.40','2026-03-05 09:30:17');
INSERT INTO aviator_history VALUES ('24','2.75','2026-03-05 09:30:40');
INSERT INTO aviator_history VALUES ('25','1.76','2026-03-05 09:30:59');
INSERT INTO aviator_history VALUES ('26','1.38','2026-03-05 09:31:12');
INSERT INTO aviator_history VALUES ('27','1.04','2026-03-05 09:31:22');
INSERT INTO aviator_history VALUES ('28','19.56','2026-03-05 09:32:10');
INSERT INTO aviator_history VALUES ('29','2.88','2026-03-05 09:32:33');
INSERT INTO aviator_history VALUES ('30','1.15','2026-03-05 09:32:45');
INSERT INTO aviator_history VALUES ('31','1.12','2026-03-05 09:32:56');
INSERT INTO aviator_history VALUES ('32','1.20','2026-03-05 09:33:10');
INSERT INTO aviator_history VALUES ('33','1.57','2026-03-05 09:33:27');
INSERT INTO aviator_history VALUES ('34','2.51','2026-03-05 09:33:48');
INSERT INTO aviator_history VALUES ('35','2.99','2026-03-05 09:34:13');
INSERT INTO aviator_history VALUES ('36','1.27','2026-03-05 09:34:27');
INSERT INTO aviator_history VALUES ('37','1.66','2026-03-05 09:34:44');
INSERT INTO aviator_history VALUES ('38','2.98','2026-03-05 09:35:09');
INSERT INTO aviator_history VALUES ('39','12.29','2026-03-05 09:35:50');
INSERT INTO aviator_history VALUES ('40','1.10','2026-03-05 09:36:02');
INSERT INTO aviator_history VALUES ('41','2.10','2026-03-05 09:36:23');
INSERT INTO aviator_history VALUES ('42','10.21','2026-03-05 09:37:02');
INSERT INTO aviator_history VALUES ('43','1.30','2026-03-05 09:37:16');
INSERT INTO aviator_history VALUES ('44','6.61','2026-03-05 09:37:50');
INSERT INTO aviator_history VALUES ('45','5.83','2026-03-05 09:38:21');
INSERT INTO aviator_history VALUES ('46','1.17','2026-03-05 09:38:32');
INSERT INTO aviator_history VALUES ('47','1.27','2026-03-05 09:38:46');
INSERT INTO aviator_history VALUES ('48','2.79','2026-03-05 09:39:08');
INSERT INTO aviator_history VALUES ('49','6.91','2026-03-05 09:39:43');
INSERT INTO aviator_history VALUES ('50','5.51','2026-03-05 09:40:13');
INSERT INTO aviator_history VALUES ('51','7.43','2026-03-05 09:40:48');
INSERT INTO aviator_history VALUES ('52','1.17','2026-03-05 09:40:59');
INSERT INTO aviator_history VALUES ('53','1.02','2026-03-05 09:41:10');
INSERT INTO aviator_history VALUES ('54','2.30','2026-03-05 09:42:05');
INSERT INTO aviator_history VALUES ('55','1.23','2026-03-05 09:43:05');
INSERT INTO aviator_history VALUES ('56','15.06','2026-03-05 09:44:06');
INSERT INTO aviator_history VALUES ('57','6.60','2026-03-05 09:45:07');
INSERT INTO aviator_history VALUES ('58','2.66','2026-03-05 09:46:06');
INSERT INTO aviator_history VALUES ('59','1.12','2026-03-05 09:47:11');
INSERT INTO aviator_history VALUES ('60','6.90','2026-03-05 09:48:05');
INSERT INTO aviator_history VALUES ('61','1.67','2026-03-05 09:49:06');
INSERT INTO aviator_history VALUES ('62','1.02','2026-03-05 09:50:07');
INSERT INTO aviator_history VALUES ('63','1.13','2026-03-05 09:51:06');
INSERT INTO aviator_history VALUES ('64','2.60','2026-03-05 09:52:05');
INSERT INTO aviator_history VALUES ('65','2.85','2026-03-05 09:53:06');
INSERT INTO aviator_history VALUES ('66','2.72','2026-03-05 09:53:46');
INSERT INTO aviator_history VALUES ('67','2.87','2026-03-05 09:54:09');
INSERT INTO aviator_history VALUES ('68','1.41','2026-03-05 09:54:22');
INSERT INTO aviator_history VALUES ('69','2.72','2026-03-05 09:54:45');
INSERT INTO aviator_history VALUES ('70','1.41','2026-03-05 09:54:58');
INSERT INTO aviator_history VALUES ('71','1.01','2026-03-05 09:55:09');
INSERT INTO aviator_history VALUES ('72','2.55','2026-03-05 09:55:30');
INSERT INTO aviator_history VALUES ('73','6.71','2026-03-05 09:56:03');
INSERT INTO aviator_history VALUES ('74','5.06','2026-03-05 09:56:33');
INSERT INTO aviator_history VALUES ('75','2.00','2026-03-05 09:57:42');
INSERT INTO aviator_history VALUES ('76','2.49','2026-03-05 09:58:03');
INSERT INTO aviator_history VALUES ('77','1.23','2026-03-05 09:58:19');
INSERT INTO aviator_history VALUES ('78','1.77','2026-03-05 09:58:36');
INSERT INTO aviator_history VALUES ('79','2.39','2026-03-05 09:58:57');
INSERT INTO aviator_history VALUES ('80','2.12','2026-03-05 09:59:16');
INSERT INTO aviator_history VALUES ('81','1.38','2026-03-05 09:59:31');
INSERT INTO aviator_history VALUES ('82','19.77','2026-03-05 10:00:19');
INSERT INTO aviator_history VALUES ('83','1.20','2026-03-05 10:00:32');
INSERT INTO aviator_history VALUES ('84','5.48','2026-03-05 10:01:03');
INSERT INTO aviator_history VALUES ('85','2.82','2026-03-05 10:01:25');
INSERT INTO aviator_history VALUES ('86','25.15','2026-03-05 10:02:26');
INSERT INTO aviator_history VALUES ('87','2.60','2026-03-05 10:02:48');
INSERT INTO aviator_history VALUES ('88','1.32','2026-03-05 10:03:02');
INSERT INTO aviator_history VALUES ('89','1.00','2026-03-05 10:03:11');
INSERT INTO aviator_history VALUES ('90','3.23','2026-03-05 10:03:35');
INSERT INTO aviator_history VALUES ('91','7.07','2026-03-05 10:04:09');
INSERT INTO aviator_history VALUES ('92','2.72','2026-03-05 10:04:31');
INSERT INTO aviator_history VALUES ('93','5.83','2026-03-05 10:05:03');
INSERT INTO aviator_history VALUES ('94','1.30','2026-03-05 10:05:16');
INSERT INTO aviator_history VALUES ('95','1.13','2026-03-05 10:05:27');
INSERT INTO aviator_history VALUES ('96','3.16','2026-03-05 10:05:52');
INSERT INTO aviator_history VALUES ('97','1.05','2026-03-05 10:06:02');
INSERT INTO aviator_history VALUES ('98','7.97','2026-03-05 10:06:39');
INSERT INTO aviator_history VALUES ('99','1.38','2026-03-05 10:06:52');
INSERT INTO aviator_history VALUES ('100','2.30','2026-03-05 10:08:05');
INSERT INTO aviator_history VALUES ('101','1.11','2026-03-05 10:09:05');
INSERT INTO aviator_history VALUES ('102','1.31','2026-03-05 10:10:06');
INSERT INTO aviator_history VALUES ('103','2.30','2026-03-05 10:11:05');
INSERT INTO aviator_history VALUES ('104','2.06','2026-03-05 10:12:06');
INSERT INTO aviator_history VALUES ('105','8.52','2026-03-05 10:13:06');
INSERT INTO aviator_history VALUES ('106','2.21','2026-03-05 10:14:07');
INSERT INTO aviator_history VALUES ('107','5.55','2026-03-05 10:15:06');
INSERT INTO aviator_history VALUES ('108','2.52','2026-03-05 10:16:05');
INSERT INTO aviator_history VALUES ('109','1.08','2026-03-05 10:17:05');
INSERT INTO aviator_history VALUES ('110','1.25','2026-03-05 10:17:20');
INSERT INTO aviator_history VALUES ('111','1.64','2026-03-05 10:17:36');
INSERT INTO aviator_history VALUES ('112','1.34','2026-03-05 10:17:50');
INSERT INTO aviator_history VALUES ('113','1.44','2026-03-05 10:18:05');
INSERT INTO aviator_history VALUES ('114','2.88','2026-03-05 10:18:27');
INSERT INTO aviator_history VALUES ('115','1.71','2026-03-05 10:18:44');
INSERT INTO aviator_history VALUES ('116','1.69','2026-03-05 10:19:00');
INSERT INTO aviator_history VALUES ('117','2.93','2026-03-05 10:19:23');
INSERT INTO aviator_history VALUES ('118','2.19','2026-03-05 10:19:42');
INSERT INTO aviator_history VALUES ('119','4.40','2026-03-05 10:20:10');
INSERT INTO aviator_history VALUES ('120','19.19','2026-03-05 10:20:57');
INSERT INTO aviator_history VALUES ('121','2.06','2026-03-05 10:21:15');
INSERT INTO aviator_history VALUES ('122','1.12','2026-03-05 10:21:27');
INSERT INTO aviator_history VALUES ('123','1.18','2026-03-05 10:21:39');
INSERT INTO aviator_history VALUES ('124','25.92','2026-03-05 10:22:30');
INSERT INTO aviator_history VALUES ('125','2.16','2026-03-05 10:22:48');
INSERT INTO aviator_history VALUES ('126','3.26','2026-03-05 10:23:13');
INSERT INTO aviator_history VALUES ('127','1.01','2026-03-05 10:23:24');
INSERT INTO aviator_history VALUES ('128','1.90','2026-03-05 10:23:42');
INSERT INTO aviator_history VALUES ('129','1.62','2026-03-05 10:23:58');
INSERT INTO aviator_history VALUES ('130','6.83','2026-03-05 10:24:31');
INSERT INTO aviator_history VALUES ('131','1.79','2026-03-05 10:24:48');
INSERT INTO aviator_history VALUES ('132','7.55','2026-03-05 10:25:22');
INSERT INTO aviator_history VALUES ('133','1.50','2026-03-05 10:25:37');
INSERT INTO aviator_history VALUES ('134','4.71','2026-03-05 10:26:07');
INSERT INTO aviator_history VALUES ('135','1.06','2026-03-05 10:26:16');
INSERT INTO aviator_history VALUES ('136','1.28','2026-03-05 10:26:30');
INSERT INTO aviator_history VALUES ('137','2.99','2026-03-05 10:27:06');
INSERT INTO aviator_history VALUES ('138','7.18','2026-03-05 10:28:05');
INSERT INTO aviator_history VALUES ('139','7.64','2026-03-05 10:29:06');
INSERT INTO aviator_history VALUES ('140','1.38','2026-03-05 10:30:06');
INSERT INTO aviator_history VALUES ('141','1.02','2026-03-05 10:30:19');
INSERT INTO aviator_history VALUES ('142','1.27','2026-03-05 10:30:33');
INSERT INTO aviator_history VALUES ('143','7.85','2026-03-05 10:31:09');
INSERT INTO aviator_history VALUES ('144','2.65','2026-03-05 10:31:37');
INSERT INTO aviator_history VALUES ('145','6.64','2026-03-05 10:32:11');
INSERT INTO aviator_history VALUES ('146','2.50','2026-03-05 10:33:05');
INSERT INTO aviator_history VALUES ('147','4.36','2026-03-05 10:33:33');
INSERT INTO aviator_history VALUES ('148','2.37','2026-03-05 10:33:54');
INSERT INTO aviator_history VALUES ('149','1.22','2026-03-05 10:34:06');
INSERT INTO aviator_history VALUES ('150','1.05','2026-03-05 10:34:16');
INSERT INTO aviator_history VALUES ('151','1.08','2026-03-05 10:34:27');
INSERT INTO aviator_history VALUES ('152','2.58','2026-03-05 10:35:06');
INSERT INTO aviator_history VALUES ('153','7.40','2026-03-05 10:36:05');
INSERT INTO aviator_history VALUES ('154','2.34','2026-03-05 10:37:05');
INSERT INTO aviator_history VALUES ('155','2.62','2026-03-05 10:38:05');
INSERT INTO aviator_history VALUES ('156','1.36','2026-03-05 10:39:06');
INSERT INTO aviator_history VALUES ('157','5.14','2026-03-05 10:40:06');
INSERT INTO aviator_history VALUES ('158','1.07','2026-03-05 10:41:06');
INSERT INTO aviator_history VALUES ('159','3.76','2026-03-05 10:42:06');
INSERT INTO aviator_history VALUES ('160','1.04','2026-03-05 10:43:05');
INSERT INTO aviator_history VALUES ('161','1.27','2026-03-05 10:43:30');
INSERT INTO aviator_history VALUES ('162','16.63','2026-03-05 10:44:15');
INSERT INTO aviator_history VALUES ('163','1.22','2026-03-05 10:44:26');
INSERT INTO aviator_history VALUES ('164','1.01','2026-03-05 10:44:37');
INSERT INTO aviator_history VALUES ('165','1.18','2026-03-05 10:44:50');
INSERT INTO aviator_history VALUES ('166','5.17','2026-03-05 10:45:19');
INSERT INTO aviator_history VALUES ('167','7.63','2026-03-05 10:46:05');
INSERT INTO aviator_history VALUES ('168','2.94','2026-03-05 10:47:05');
INSERT INTO aviator_history VALUES ('169','1.45','2026-03-05 10:48:06');
INSERT INTO aviator_history VALUES ('170','1.21','2026-03-05 10:49:05');
INSERT INTO aviator_history VALUES ('171','7.70','2026-03-05 10:50:06');
INSERT INTO aviator_history VALUES ('172','1.44','2026-03-05 10:51:05');
INSERT INTO aviator_history VALUES ('173','1.18','2026-03-05 10:52:05');
INSERT INTO aviator_history VALUES ('174','9.74','2026-03-05 10:52:54');
INSERT INTO aviator_history VALUES ('175','1.96','2026-03-05 10:53:12');
INSERT INTO aviator_history VALUES ('176','5.39','2026-03-05 10:53:43');
INSERT INTO aviator_history VALUES ('177','1.41','2026-03-05 10:53:57');
INSERT INTO aviator_history VALUES ('178','1.43','2026-03-05 10:54:12');
INSERT INTO aviator_history VALUES ('179','6.44','2026-03-05 10:54:45');
INSERT INTO aviator_history VALUES ('180','2.85','2026-03-05 10:55:08');
INSERT INTO aviator_history VALUES ('181','18.57','2026-03-05 10:55:53');
INSERT INTO aviator_history VALUES ('182','1.03','2026-03-05 10:56:03');
INSERT INTO aviator_history VALUES ('183','6.25','2026-03-05 10:56:35');
INSERT INTO aviator_history VALUES ('184','1.29','2026-03-05 10:57:05');
INSERT INTO aviator_history VALUES ('185','1.23','2026-03-05 10:58:05');
INSERT INTO aviator_history VALUES ('186','2.75','2026-03-05 10:58:27');
INSERT INTO aviator_history VALUES ('187','1.25','2026-03-05 10:58:39');
INSERT INTO aviator_history VALUES ('188','1.03','2026-03-05 10:58:49');
INSERT INTO aviator_history VALUES ('189','2.23','2026-03-05 10:59:09');
INSERT INTO aviator_history VALUES ('190','2.29','2026-03-05 10:59:29');
INSERT INTO aviator_history VALUES ('191','1.29','2026-03-05 10:59:42');
INSERT INTO aviator_history VALUES ('192','2.20','2026-03-05 11:00:02');
INSERT INTO aviator_history VALUES ('193','6.66','2026-03-05 11:00:35');
INSERT INTO aviator_history VALUES ('194','2.54','2026-03-05 11:00:56');
INSERT INTO aviator_history VALUES ('195','5.20','2026-03-05 11:01:26');
INSERT INTO aviator_history VALUES ('196','1.30','2026-03-05 11:01:39');
INSERT INTO aviator_history VALUES ('197','1.49','2026-03-05 11:01:54');
INSERT INTO aviator_history VALUES ('198','10.44','2026-03-05 11:02:33');
INSERT INTO aviator_history VALUES ('199','1.31','2026-03-05 11:02:47');
INSERT INTO aviator_history VALUES ('200','1.06','2026-03-05 11:02:57');
INSERT INTO aviator_history VALUES ('201','1.91','2026-03-05 11:03:15');
INSERT INTO aviator_history VALUES ('202','1.12','2026-03-05 11:03:26');
INSERT INTO aviator_history VALUES ('203','1.12','2026-03-05 11:03:36');
INSERT INTO aviator_history VALUES ('204','7.53','2026-03-05 11:04:11');
INSERT INTO aviator_history VALUES ('205','1.14','2026-03-05 11:04:23');
INSERT INTO aviator_history VALUES ('206','1.36','2026-03-05 11:04:36');
INSERT INTO aviator_history VALUES ('207','1.20','2026-03-05 11:04:48');
INSERT INTO aviator_history VALUES ('208','6.82','2026-03-05 11:05:23');
INSERT INTO aviator_history VALUES ('209','2.64','2026-03-05 11:05:45');
INSERT INTO aviator_history VALUES ('210','13.15','2026-03-05 11:06:27');
INSERT INTO aviator_history VALUES ('211','6.76','2026-03-05 11:07:00');
INSERT INTO aviator_history VALUES ('212','1.36','2026-03-05 11:07:14');
INSERT INTO aviator_history VALUES ('213','10.89','2026-03-05 11:07:53');
INSERT INTO aviator_history VALUES ('214','2.14','2026-03-05 11:08:13');
INSERT INTO aviator_history VALUES ('215','1.19','2026-03-05 11:08:25');
INSERT INTO aviator_history VALUES ('216','1.29','2026-03-05 11:08:38');
INSERT INTO aviator_history VALUES ('217','1.69','2026-03-05 11:08:55');
INSERT INTO aviator_history VALUES ('218','22.94','2026-03-05 11:09:44');
INSERT INTO aviator_history VALUES ('219','1.22','2026-03-05 11:09:56');
INSERT INTO aviator_history VALUES ('220','1.14','2026-03-05 11:10:07');
INSERT INTO aviator_history VALUES ('221','4.03','2026-03-05 11:10:34');
INSERT INTO aviator_history VALUES ('222','6.79','2026-03-05 11:11:07');
INSERT INTO aviator_history VALUES ('223','1.65','2026-03-05 11:11:25');
INSERT INTO aviator_history VALUES ('224','2.07','2026-03-05 11:11:43');
INSERT INTO aviator_history VALUES ('225','1.69','2026-03-05 11:12:05');
INSERT INTO aviator_history VALUES ('226','1.18','2026-03-05 11:13:06');
INSERT INTO aviator_history VALUES ('227','1.14','2026-03-05 11:14:06');
INSERT INTO aviator_history VALUES ('228','1.50','2026-03-05 11:15:05');
INSERT INTO aviator_history VALUES ('229','1.15','2026-03-05 11:16:06');
INSERT INTO aviator_history VALUES ('230','3.43','2026-03-05 11:17:05');
INSERT INTO aviator_history VALUES ('231','6.14','2026-03-05 11:18:06');
INSERT INTO aviator_history VALUES ('232','1.20','2026-03-05 11:19:06');
INSERT INTO aviator_history VALUES ('233','2.81','2026-03-05 11:20:07');
INSERT INTO aviator_history VALUES ('234','7.92','2026-03-05 11:21:05');
INSERT INTO aviator_history VALUES ('235','1.35','2026-03-05 11:22:05');
INSERT INTO aviator_history VALUES ('236','5.37','2026-03-05 11:23:05');
INSERT INTO aviator_history VALUES ('237','1.09','2026-03-05 11:24:05');
INSERT INTO aviator_history VALUES ('238','1.16','2026-03-05 11:24:18');
INSERT INTO aviator_history VALUES ('239','1.56','2026-03-05 11:24:32');
INSERT INTO aviator_history VALUES ('240','1.94','2026-03-05 11:24:50');
INSERT INTO aviator_history VALUES ('241','1.59','2026-03-05 11:25:05');
INSERT INTO aviator_history VALUES ('242','8.96','2026-03-05 11:25:43');
INSERT INTO aviator_history VALUES ('243','1.93','2026-03-05 11:26:01');
INSERT INTO aviator_history VALUES ('244','5.38','2026-03-05 11:26:32');
INSERT INTO aviator_history VALUES ('245','4.45','2026-03-05 11:27:01');
INSERT INTO aviator_history VALUES ('246','4.83','2026-03-05 11:27:31');
INSERT INTO aviator_history VALUES ('247','2.37','2026-03-05 11:27:52');
INSERT INTO aviator_history VALUES ('248','7.69','2026-03-05 11:28:28');
INSERT INTO aviator_history VALUES ('249','2.86','2026-03-05 11:31:34');
INSERT INTO aviator_history VALUES ('250','1.09','2026-03-05 11:31:45');
INSERT INTO aviator_history VALUES ('251','2.87','2026-03-05 11:57:53');
INSERT INTO aviator_history VALUES ('252','1.09','2026-03-05 12:03:25');
INSERT INTO aviator_history VALUES ('253','1.15','2026-03-05 12:03:36');
INSERT INTO aviator_history VALUES ('254','1.08','2026-03-05 12:03:47');
INSERT INTO aviator_history VALUES ('255','2.26','2026-03-05 12:04:06');
INSERT INTO aviator_history VALUES ('256','1.42','2026-03-05 12:04:20');
INSERT INTO aviator_history VALUES ('257','3.30','2026-03-05 12:28:20');
INSERT INTO aviator_history VALUES ('258','1.28','2026-03-05 12:28:32');
INSERT INTO aviator_history VALUES ('259','2.30','2026-03-05 16:43:20');
INSERT INTO aviator_history VALUES ('260','9.52','2026-03-05 20:25:29');
INSERT INTO aviator_history VALUES ('261','2.42','2026-03-05 23:19:57');
INSERT INTO aviator_history VALUES ('262','6.26','2026-03-05 23:20:56');
INSERT INTO aviator_history VALUES ('263','1.05','2026-03-05 23:21:07');
INSERT INTO aviator_history VALUES ('264','1.08','2026-03-06 09:48:28');
INSERT INTO aviator_history VALUES ('265','4.45','2026-03-06 09:54:20');
INSERT INTO aviator_history VALUES ('266','7.37','2026-03-06 09:54:55');
INSERT INTO aviator_history VALUES ('267','6.28','2026-03-06 10:56:27');
INSERT INTO aviator_history VALUES ('268','1.39','2026-03-06 10:57:29');
INSERT INTO aviator_history VALUES ('269','3.04','2026-03-06 10:58:33');
INSERT INTO aviator_history VALUES ('270','2.71','2026-03-06 10:58:55');
INSERT INTO aviator_history VALUES ('271','1.26','2026-03-06 10:59:07');
INSERT INTO aviator_history VALUES ('272','1.14','2026-03-06 10:59:19');
INSERT INTO aviator_history VALUES ('273','2.60','2026-03-06 10:59:40');
INSERT INTO aviator_history VALUES ('274','2.96','2026-03-06 11:00:04');
INSERT INTO aviator_history VALUES ('275','1.17','2026-03-06 11:00:16');
INSERT INTO aviator_history VALUES ('276','11.55','2026-03-06 11:41:45');
INSERT INTO aviator_history VALUES ('277','2.24','2026-03-06 18:00:07');
INSERT INTO aviator_history VALUES ('278','1.58','2026-03-06 18:01:35');
INSERT INTO aviator_history VALUES ('279','2.76','2026-03-06 18:01:57');
INSERT INTO aviator_history VALUES ('280','1.37','2026-03-06 18:02:11');
INSERT INTO aviator_history VALUES ('281','1.29','2026-03-06 18:02:24');
INSERT INTO aviator_history VALUES ('282','1.43','2026-03-07 09:17:33');
INSERT INTO aviator_history VALUES ('283','1.48','2026-08-11 17:51:12');
INSERT INTO aviator_history VALUES ('284','5.71','2026-08-17 06:07:44');
INSERT INTO aviator_history VALUES ('285','1.58','2026-08-17 06:08:00');
INSERT INTO aviator_history VALUES ('286','5.78','2026-08-18 03:05:39');
INSERT INTO aviator_history VALUES ('287','7.72','2026-08-25 03:13:57');
INSERT INTO aviator_history VALUES ('288','1.33','2026-08-25 06:13:37');
INSERT INTO aviator_history VALUES ('289','1.16','2026-08-25 06:13:48');
INSERT INTO aviator_history VALUES ('290','25.63','2026-08-25 06:14:39');
INSERT INTO aviator_history VALUES ('291','6.48','2026-08-25 06:15:12');
INSERT INTO aviator_history VALUES ('292','1.11','2026-08-25 06:15:23');
INSERT INTO aviator_history VALUES ('293','1.15','2026-08-25 06:15:35');
INSERT INTO aviator_history VALUES ('294','4.35','2026-08-25 06:16:03');
INSERT INTO aviator_history VALUES ('295','1.30','2026-09-01 19:27:25');
INSERT INTO aviator_history VALUES ('296','5.64','2026-09-01 19:28:12');

DROP TABLE IF EXISTS aviator_state;
CREATE TABLE `aviator_state` (
  `id` int(11) NOT NULL,
  `status` varchar(20) DEFAULT NULL,
  `start_time` double DEFAULT NULL,
  `target_multiplier` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO aviator_state VALUES ('1','flying','1788271097880.3','26.97');

DROP TABLE IF EXISTS bank_details;
CREATE TABLE `bank_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `bank_name` varchar(100) NOT NULL,
  `account_no` varchar(100) NOT NULL,
  `ifsc_code` varchar(20) NOT NULL,
  `account_holder` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `bank_details_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO bank_details VALUES ('1','3','Punjab National Bank (PNB)','235008','POIC','deepanshu');

DROP TABLE IF EXISTS banners;
CREATE TABLE `banners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(200) NOT NULL,
  `image` varchar(255) NOT NULL,
  `link` varchar(255) DEFAULT '#',
  `position` enum('home_top','home_middle','promo') DEFAULT 'home_top',
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO banners VALUES ('9','bonus','1772265562_45win_banner_3.png','#','home_top','0','1','2026-02-28 08:59:22');
INSERT INTO banners VALUES ('13','g','1772269979_45win_slider_1.png','#','home_top','0','1','2026-02-28 10:13:00');
INSERT INTO banners VALUES ('14','g','1772271659_45win_slider_1.png','#','home_top','0','1','2026-02-28 10:41:00');

DROP TABLE IF EXISTS bets;
CREATE TABLE `bets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `game_type` varchar(50) NOT NULL,
  `period` varchar(50) NOT NULL,
  `selection` varchar(20) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` enum('pending','win','lose') DEFAULT 'pending',
  `win_amount` decimal(10,2) DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO bets VALUES ('1','3','wingo_1min','2026022810741','Small','1.00','pending','0.00','2026-02-28 12:20:36');
INSERT INTO bets VALUES ('2','3','wingo_1min','2026022810741','Big','10.00','pending','0.00','2026-02-28 12:20:47');
INSERT INTO bets VALUES ('3','3','wingo_1min','2026022810767','Small','1.00','lose','0.00','2026-02-28 12:46:07');
INSERT INTO bets VALUES ('4','3','wingo_1min','2026022810767','Small','10.00','lose','0.00','2026-02-28 12:46:16');
INSERT INTO bets VALUES ('5','3','wingo_1min','2026022810768','Small','10.00','win','20.00','2026-02-28 12:47:08');
INSERT INTO bets VALUES ('6','3','wingo_1min','2026022810911','Small','10.00','win','20.00','2026-02-28 15:10:22');
INSERT INTO bets VALUES ('7','3','wingo_1min','2026022810936','Small','10.00','win','20.00','2026-02-28 15:35:07');
INSERT INTO bets VALUES ('8','3','wingo_1min','2026022810938','Small','10.00','lose','0.00','2026-02-28 15:37:13');
INSERT INTO bets VALUES ('9','3','wingo_1min','2026022810945','Small','10.00','lose','0.00','2026-02-28 15:44:42');
INSERT INTO bets VALUES ('10','3','wingo_1min','2026022810947','Small','10.00','win','20.00','2026-02-28 15:46:08');
INSERT INTO bets VALUES ('11','3','wingo_1min','MATCH_IPL_3','CSK Runs Under 222 @','10.00','lose','0.00','2026-02-28 16:09:48');
INSERT INTO bets VALUES ('12','3','wingo_1min','M_1772276759','uk [LAY] @0.97','10.00','win','10.00','2026-02-28 16:38:36');
INSERT INTO bets VALUES ('13','3','wingo_1min','M_1772277746','ind [BACK] @1','11.00','win','0.00','2026-02-28 18:56:11');
INSERT INTO bets VALUES ('14','3','wingo_1min','33439271','India [BACK] @2.86','10.00','win','18.60','2026-02-28 19:35:29');
INSERT INTO bets VALUES ('15','3','wingo_1min','33439271','India [LAY] @2.86','18.60','pending','0.00','2026-02-28 19:44:37');
INSERT INTO bets VALUES ('16','3','wingo_1min','33439271','South Africa [BACK] ','10.00','pending','0.00','2026-02-28 19:44:42');
INSERT INTO bets VALUES ('17','3','wingo_1min','35307539','Sri Lanka [BACK] @6','10.00','pending','0.00','2026-02-28 19:45:14');
INSERT INTO bets VALUES ('18','5','wingo_1min','33439271','India [BACK] @2.82','50.00','pending','0.00','2026-02-28 21:22:10');
INSERT INTO bets VALUES ('19','7','wingo_1min','2026030110985','Small','10.00','win','20.00','2026-03-01 16:24:48');
INSERT INTO bets VALUES ('20','7','wingo_1min','2026030110986','Big','10.00','win','20.00','2026-03-01 16:25:19');
INSERT INTO bets VALUES ('21','3','wingo_1min','33439271','India [BACK] @2.72','10.00','pending','0.00','2026-03-01 20:11:40');
INSERT INTO bets VALUES ('22','9','wingo_1min','2026030211118','Big','1.00','win','2.00','2026-03-02 18:37:23');
INSERT INTO bets VALUES ('23','10','wingo_1min','2026030411407','Big','1.00','lose','0.00','2026-03-04 23:26:39');
INSERT INTO bets VALUES ('24','14','wingo_1min','2026081810216','0','1.00','pending','0.00','2026-08-18 03:05:31');
INSERT INTO bets VALUES ('25','15','wingo_1min','2026082700858','Red','1.00','win','2.00','2026-08-27 07:08:41');
INSERT INTO bets VALUES ('26','18','wingo_1min','2026090111170','1','1.00','pending','0.00','2026-09-01 19:29:12');
INSERT INTO bets VALUES ('27','18','wingo_1min','2026090111170','0','1.00','pending','0.00','2026-09-01 19:29:35');

DROP TABLE IF EXISTS categories;
CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `icon` varchar(50) DEFAULT 'gamepad',
  `image` varchar(255) DEFAULT 'default-category.png',
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO categories VALUES ('1','Color Prediction','color-prediction','palette','1772263416_ball_8-075598b0.svg','1','1','2026-02-28 06:21:23');
INSERT INTO categories VALUES ('2','Wingo Lottery','wingo','dice','default-category.png','2','1','2026-02-28 06:21:23');
INSERT INTO categories VALUES ('3','Cricket Betting','cricket-betting','baseball-bat-ball','1772263494_sports_a-5313dd33.svg','3','1','2026-02-28 06:21:23');
INSERT INTO categories VALUES ('4','Live Casino','live-casino','coins','1772263477_live-7d277a8c.svg','4','1','2026-02-28 06:21:23');
INSERT INTO categories VALUES ('5','Slot Games','slot-games','slot-machine','1772263379_slots_a-de9dd5ee.svg','5','1','2026-02-28 06:21:23');

DROP TABLE IF EXISTS cricket_settings;
CREATE TABLE `cricket_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mode` enum('manual','api') DEFAULT 'manual',
  `api_url` varchar(255) DEFAULT 'https://api.cricapi.com/v1/currentMatches',
  `api_key` varchar(100) DEFAULT 'DEMO',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO cricket_settings VALUES ('1','api','https://api.f1ojm.com/api/public/exchange/odds/inPlayAndPopularEvents','https://api.f1ojm.com/api/public/exchange/odds/inPlayAndPopularEvents');

DROP TABLE IF EXISTS deposit_requests;
CREATE TABLE `deposit_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(50) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `payment_method` varchar(50) NOT NULL,
  `utr_number` varchar(100) DEFAULT NULL,
  `screenshot` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `created_at` datetime DEFAULT current_timestamp(),
  `channel_id` int(11) NOT NULL DEFAULT 0,
  `actual_pay_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `idx_deposit_status` (`status`),
  CONSTRAINT `deposit_requests_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO deposit_requests VALUES ('1',NULL,'3','100.00','','323232323232',NULL,'pending','2026-03-01 16:54:59','1','99.15');
INSERT INTO deposit_requests VALUES ('2','RC202603011601139383','3','100.00','','121212121234',NULL,'pending','2026-03-01 17:01:13','1','99.32');
INSERT INTO deposit_requests VALUES ('3','RC202603011606575367','3','100.00','','787878787876',NULL,'pending','2026-03-01 17:06:57','1','99.55');
INSERT INTO deposit_requests VALUES ('4','RC202603051825067774','11','100.00','','789456123654',NULL,'pending','2026-03-05 19:25:06','1','99.71');

DROP TABLE IF EXISTS first_gift_claims;
CREATE TABLE `first_gift_claims` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `deposit_amount` decimal(10,2) NOT NULL,
  `bonus_amount` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS game_history;
CREATE TABLE `game_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `game_name` varchar(50) NOT NULL,
  `bet_amount` decimal(10,2) NOT NULL,
  `win_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `multiplier` decimal(10,2) NOT NULL DEFAULT 0.00,
  `status` enum('win','loss') NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO game_history VALUES ('1','3','Chicken Road 2','10.00','0.00','0.00','loss','2026-03-05 14:19:46');
INSERT INTO game_history VALUES ('2','3','Chicken Road 2','10.00','0.00','0.00','loss','2026-03-05 14:29:35');
INSERT INTO game_history VALUES ('3','3','Chicken Road 2','10.00','20.00','2.00','win','2026-03-05 14:34:41');
INSERT INTO game_history VALUES ('4','3','Chicken Road 2','10.00','400.00','40.00','win','2026-03-05 14:44:16');
INSERT INTO game_history VALUES ('5','3','Chicken Road 2','10.00','400.00','40.00','win','2026-03-05 14:44:27');
INSERT INTO game_history VALUES ('6','3','Chicken Road Pro','10.00','400.00','40.00','win','2026-03-05 15:13:06');
INSERT INTO game_history VALUES ('7','3','Chicken Road 2','10.00','0.00','0.00','loss','2026-03-05 15:14:01');
INSERT INTO game_history VALUES ('8','3','Chicken Road 2','10.00','0.00','0.00','loss','2026-03-05 15:14:07');
INSERT INTO game_history VALUES ('9','3','Chicken Road Pro','10.00','400.00','40.00','win','2026-03-05 15:21:08');
INSERT INTO game_history VALUES ('10','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:27:15');
INSERT INTO game_history VALUES ('11','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:27:21');
INSERT INTO game_history VALUES ('12','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:27:27');
INSERT INTO game_history VALUES ('13','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:27:31');
INSERT INTO game_history VALUES ('14','3','Chicken Road Pro','10.00','400.00','40.00','win','2026-03-05 15:27:38');
INSERT INTO game_history VALUES ('15','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:38:04');
INSERT INTO game_history VALUES ('16','3','Chicken Road Pro','10.00','16.00','1.60','win','2026-03-05 15:38:23');
INSERT INTO game_history VALUES ('17','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:38:32');
INSERT INTO game_history VALUES ('18','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:38:39');
INSERT INTO game_history VALUES ('19','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:38:52');
INSERT INTO game_history VALUES ('20','3','Chicken Road Pro','10.00','0.00','0.00','loss','2026-03-05 15:39:03');
INSERT INTO game_history VALUES ('21','3','Chicken Road Pro','10.00','40.00','4.00','win','2026-03-05 15:45:09');
INSERT INTO game_history VALUES ('22','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 15:52:15');
INSERT INTO game_history VALUES ('23','3','Chicken Road','10.00','400.00','40.00','win','2026-03-05 15:53:18');
INSERT INTO game_history VALUES ('24','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 15:59:20');
INSERT INTO game_history VALUES ('25','3','Chicken Road','10.00','50000.00','5000.00','win','2026-03-05 15:59:59');
INSERT INTO game_history VALUES ('26','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 16:00:16');
INSERT INTO game_history VALUES ('27','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 19:22:40');
INSERT INTO game_history VALUES ('28','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 19:23:35');
INSERT INTO game_history VALUES ('29','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 19:23:53');
INSERT INTO game_history VALUES ('30','3','Chicken Road','10.00','1000.00','100.00','win','2026-03-05 19:24:39');
INSERT INTO game_history VALUES ('31','3','Chicken Road','10.00','50000.00','5000.00','win','2026-03-05 19:27:04');
INSERT INTO game_history VALUES ('32','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 19:27:30');
INSERT INTO game_history VALUES ('33','3','Chicken Road','10.00','0.00','0.00','loss','2026-03-05 19:27:42');
INSERT INTO game_history VALUES ('34','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:49:15');
INSERT INTO game_history VALUES ('35','3','Mines Pro','10.00','14.30','1.43','win','2026-03-05 19:49:34');
INSERT INTO game_history VALUES ('36','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:49:46');
INSERT INTO game_history VALUES ('37','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:49:51');
INSERT INTO game_history VALUES ('38','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:49:56');
INSERT INTO game_history VALUES ('39','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:50:00');
INSERT INTO game_history VALUES ('40','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:50:07');
INSERT INTO game_history VALUES ('41','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:56:10');
INSERT INTO game_history VALUES ('42','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:56:15');
INSERT INTO game_history VALUES ('43','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:56:21');
INSERT INTO game_history VALUES ('44','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:56:33');
INSERT INTO game_history VALUES ('45','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:57:27');
INSERT INTO game_history VALUES ('46','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:58:56');
INSERT INTO game_history VALUES ('47','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 19:59:09');
INSERT INTO game_history VALUES ('48','3','Mines Pro','10.00','242.50','24.25','win','2026-03-05 20:05:21');
INSERT INTO game_history VALUES ('49','3','Mines Pro','10.00','515361.00','51536.10','win','2026-03-05 20:05:36');
INSERT INTO game_history VALUES ('50','3','Mines Pro','10.00','515361.00','51536.10','win','2026-03-05 20:06:05');
INSERT INTO game_history VALUES ('51','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 20:06:25');
INSERT INTO game_history VALUES ('52','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 20:06:36');
INSERT INTO game_history VALUES ('53','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 20:06:43');
INSERT INTO game_history VALUES ('54','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 20:06:48');
INSERT INTO game_history VALUES ('55','3','Mines Pro','10.00','0.00','0.00','loss','2026-03-05 23:20:35');

DROP TABLE IF EXISTS games;
CREATE TABLE `games` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `game_file` varchar(50) DEFAULT 'custom',
  `game_url` varchar(255) DEFAULT 'custom.php',
  `slug` varchar(100) NOT NULL,
  `type` varchar(50) NOT NULL,
  `image` varchar(255) DEFAULT 'default-game.png',
  `is_active` tinyint(1) DEFAULT 1,
  `is_featured` tinyint(1) DEFAULT 0,
  `display_order` int(11) DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_games_category` (`category_id`),
  CONSTRAINT `games_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO games VALUES ('1','2','Wingo 1Min','wingo','custom.php','wingo-1min','wingo','1772263708_lotterycategory_202502101011154e3a.png','1','1','1','2026-02-28 06:21:23');
INSERT INTO games VALUES ('3','3','IPL Live 2025','custom','custom.php','ipl-live','custom','1772263816_810_20250210113250708.png','1','1','3','2026-02-28 06:21:23');
INSERT INTO games VALUES ('5','1','Aviator Pro','aviator','custom.php','aviator','aviator','1772263743_800_20250210113151122.png','1','1','5','2026-02-28 06:21:23');
INSERT INTO games VALUES ('6','2','K3 Lottery','custom','custom.php','k3-lottery','wingo','1772263652_lotterycategory_20250210101053ntrf.png','1','1','6','2026-02-28 06:21:23');
INSERT INTO games VALUES ('7','5','chickin','chickin','custom.php','mine-668','custom','1772694101_121_20250806182119746.jpg','1','0','0','2026-03-05 04:45:09');
INSERT INTO games VALUES ('8','5','mine','mines','custom.php','mine-157','slots','1772718981_100.png','1','0','0','2026-03-05 14:56:21');

DROP TABLE IF EXISTS gift_codes;
CREATE TABLE `gift_codes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `max_uses` int(11) DEFAULT 1,
  `used_count` int(11) DEFAULT 0,
  `status` enum('active','expired') DEFAULT 'active',
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS invitation_claims;
CREATE TABLE `invitation_claims` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `tier_id` int(11) NOT NULL,
  `claimed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS invitation_records;
CREATE TABLE `invitation_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `referrer_id` int(11) NOT NULL,
  `referred_uid` varchar(20) NOT NULL,
  `referred_username` varchar(50) NOT NULL,
  `registered_at` datetime NOT NULL DEFAULT current_timestamp(),
  `total_deposit` decimal(10,2) DEFAULT 0.00,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS invitation_tiers;
CREATE TABLE `invitation_tiers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level` int(11) NOT NULL,
  `invitees_needed` int(11) NOT NULL,
  `recharge_needed` decimal(10,2) NOT NULL,
  `bonus_amount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO invitation_tiers VALUES ('1','1','1','300.00','55.00');
INSERT INTO invitation_tiers VALUES ('2','2','3','300.00','155.00');
INSERT INTO invitation_tiers VALUES ('3','3','10','500.00','555.00');
INSERT INTO invitation_tiers VALUES ('4','4','30','800.00','1555.00');
INSERT INTO invitation_tiers VALUES ('5','5','50','1200.00','2775.00');
INSERT INTO invitation_tiers VALUES ('6','6','75','1200.00','4165.00');
INSERT INTO invitation_tiers VALUES ('7','7','100','1200.00','5555.00');

DROP TABLE IF EXISTS live_matches;
CREATE TABLE `live_matches` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `match_id` varchar(50) NOT NULL,
  `team1_name` varchar(50) NOT NULL,
  `team1_logo` varchar(255) DEFAULT 'default.png',
  `team2_name` varchar(50) NOT NULL,
  `team2_logo` varchar(255) DEFAULT 'default.png',
  `score` varchar(255) DEFAULT '0/0 (0.0 Ov)',
  `status` varchar(100) DEFAULT 'LIVE',
  `start_time` datetime DEFAULT NULL,
  `t1_back` decimal(10,2) DEFAULT 1.00,
  `t1_lay` decimal(10,2) DEFAULT 1.00,
  `t2_back` decimal(10,2) DEFAULT 1.00,
  `t2_lay` decimal(10,2) DEFAULT 1.00,
  `is_active` int(1) DEFAULT 1,
  `is_locked` int(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS notifications;
CREATE TABLE `notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  `message` text NOT NULL,
  `is_read` tinyint(1) DEFAULT 0,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS payment_channels;
CREATE TABLE `payment_channels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `method_id` int(11) NOT NULL,
  `channel_name` varchar(50) NOT NULL,
  `min_amount` decimal(10,2) NOT NULL DEFAULT 100.00,
  `max_amount` decimal(10,2) NOT NULL DEFAULT 50000.00,
  `pay_address` varchar(255) NOT NULL,
  `status` int(1) DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO payment_channels VALUES ('1','1','Phonepe_QR','100.00','50000.00','admin1@ybl','1');
INSERT INTO payment_channels VALUES ('2','1','Paytm_QR','300.00','100000.00','admin2@paytm','1');
INSERT INTO payment_channels VALUES ('3','2','TRC20','800.00','500000.00','TXYZ1234567890usdtAddress','1');
INSERT INTO payment_channels VALUES ('4','2','c','2.00','50000.00','c','1');

DROP TABLE IF EXISTS payment_methods;
CREATE TABLE `payment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` varchar(20) NOT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `bonus_text` varchar(20) DEFAULT NULL,
  `status` int(1) DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO payment_methods VALUES ('1','UPI-QR','upi',NULL,NULL,'1');
INSERT INTO payment_methods VALUES ('2','USDT','usdt',NULL,'+2%','1');

DROP TABLE IF EXISTS rebate_history;
CREATE TABLE `rebate_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `rebate_amount` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO rebate_history VALUES ('1','3','0.17','2026-03-02 12:38:34');

DROP TABLE IF EXISTS settings;
CREATE TABLE `settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(255) NOT NULL,
  `setting_value` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_key` (`setting_key`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO settings VALUES ('1','chicken_win_percent','10');
INSERT INTO settings VALUES ('2','mines_win_percent','10');

DROP TABLE IF EXISTS site_settings;
CREATE TABLE `site_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_key` (`setting_key`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO site_settings VALUES ('1','site_name','45WIN','Website Name','2026-02-28 08:55:05');
INSERT INTO site_settings VALUES ('2','site_logo','logo.png','Website Logo','2026-02-28 06:21:23');
INSERT INTO site_settings VALUES ('3','min_deposit','100','Minimum Deposit Amount','2026-02-28 06:21:23');
INSERT INTO site_settings VALUES ('4','min_withdrawal','200','Minimum Withdrawal Amount','2026-02-28 06:21:23');
INSERT INTO site_settings VALUES ('5','withdraw_fee','0','Withdrawal Fee Percentage','2026-02-28 06:21:23');
INSERT INTO site_settings VALUES ('6','telegram_link','',NULL,'2026-02-28 07:03:46');
INSERT INTO site_settings VALUES ('7','chat_link','https://gemini.google.com/',NULL,'2026-03-05 15:48:58');
INSERT INTO site_settings VALUES ('10','recharge_bonus','0',NULL,'2026-02-28 07:03:46');
INSERT INTO site_settings VALUES ('51','wheel_icon','assets/images/1772726871_turntable_icon-9b14cf81.webp',NULL,'2026-03-05 17:07:51');
INSERT INTO site_settings VALUES ('56','chat_icon','assets/images/1772726920_icon_sevice-9f0c8455.webp',NULL,'2026-03-05 17:08:40');
INSERT INTO site_settings VALUES ('57','favicon','favicon.ico','Website Browser Icon','2026-03-07 04:19:16');

DROP TABLE IF EXISTS spin_credits;
CREATE TABLE `spin_credits` (
  `user_id` int(11) NOT NULL,
  `credits` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS spin_history;
CREATE TABLE `spin_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `reward_id` int(11) DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `spin_history_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS spin_rewards;
CREATE TABLE `spin_rewards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `type` enum('cash','bonus','empty') NOT NULL,
  `amount` decimal(15,2) DEFAULT 0.00,
  `probability` decimal(5,2) NOT NULL,
  `color` varchar(20) DEFAULT '#FFD700',
  `is_active` tinyint(1) DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO spin_rewards VALUES ('1','?10 Cash','cash','10.00','30.00','#4CAF50','1');
INSERT INTO spin_rewards VALUES ('2','?50 Bonus','bonus','50.00','15.00','#8BC34A','1');
INSERT INTO spin_rewards VALUES ('3','?100 Cash','cash','100.00','5.00','#CDDC39','1');
INSERT INTO spin_rewards VALUES ('4','Try Again','empty','0.00','50.00','#9E9E9E','1');

DROP TABLE IF EXISTS transactions;
CREATE TABLE `transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `type` enum('deposit','withdraw','bet','win','bonus','referral','spin_reward','refund') NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `balance_before` decimal(15,2) NOT NULL,
  `balance_after` decimal(15,2) NOT NULL,
  `reference_id` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_transactions_user` (`user_id`),
  CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS ui_images;
CREATE TABLE `ui_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image_key` varchar(50) NOT NULL,
  `base64_data` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `image_key` (`image_key`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO ui_images VALUES ('1','icon_withdraw','data:image/webp;base64, ');

DROP TABLE IF EXISTS upi_details;
CREATE TABLE `upi_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `upi_id` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `upi_details_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO upi_details VALUES ('1','3','4444');
INSERT INTO upi_details VALUES ('2','9','Hhgg@upi');
INSERT INTO upi_details VALUES ('3','5','8090797561@pthdfc');
INSERT INTO upi_details VALUES ('4','10','jhafa@fam');

DROP TABLE IF EXISTS usdt_details;
CREATE TABLE `usdt_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `usdt_address` varchar(100) NOT NULL,
  `network` varchar(20) DEFAULT 'TRC20',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


DROP TABLE IF EXISTS users;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `balance` decimal(15,2) DEFAULT 0.00,
  `bonus_balance` decimal(15,2) DEFAULT 0.00,
  `vip_level` int(11) DEFAULT 1,
  `referral_code` varchar(20) DEFAULT NULL,
  `referred_by` int(11) DEFAULT NULL,
  `status` enum('active','blocked') DEFAULT 'active',
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `mobile` (`mobile`),
  UNIQUE KEY `referral_code` (`referral_code`),
  KEY `referred_by` (`referred_by`),
  CONSTRAINT `users_ibfk_1` FOREIGN KEY (`referred_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO users VALUES ('1','AaravDemo','9876543210',NULL,'$2y$10$8M9.J0nU.y4h/L/3i0z7b.9tI7B/G0zQxT8v3H4m4Z/O0j/6Q8iYq','5000.00','0.00','1','DEMO123',NULL,'active','2026-02-28 06:21:23');
INSERT INTO users VALUES ('2','AaravPro','9988776655','aarav@gamehub.com','$2y$10$8M9.J0nU.y4h/L/3i0z7b.9tI7B/G0zQxT8v3H4m4Z/O0j/6Q8iYq','10000.00','0.00','2','AARAV100',NULL,'active','2026-02-28 06:25:23');
INSERT INTO users VALUES ('3','Mem67670','9627538698',NULL,'$2y$10$YiP34.YbMtrLNBxYEfBDVuK5Wn/ATmT9QMR3Lo.aNhTKjuzljo8z.','1183877.70','0.00','1','658DC110',NULL,'active','2026-02-28 06:28:39');
INSERT INTO users VALUES ('4','Mem70949','1258569858',NULL,'$2y$10$vSk8OUp8xftIT1eCeTipxe.QuwZM7VOJ26/gveQSsWv69glC3.ghe','0.00','0.00','1','09712879',NULL,'active','2026-02-28 16:08:33');
INSERT INTO users VALUES ('5','Mem40049','9958737717',NULL,'$2y$10$cBgdBLjgeLj0DnyV0yo3Y.1KASvINvI/QQ..Ek1Nnacjl4hXnZ1q2','0.00','0.00','1','84FEC2EC',NULL,'active','2026-02-28 16:50:37');
INSERT INTO users VALUES ('6','Mem10573','8875854605',NULL,'$2y$10$/srcpQczB/zbD0WbPy52e.tni4QR6BKC5VEFx01KGvd.xOhwCNVsK','0.00','0.00','1','37FA3054',NULL,'active','2026-02-28 19:50:13');
INSERT INTO users VALUES ('7','Mem47836','9119098026',NULL,'$2y$10$EjoEb4P7XKfloVLMWyYej.R6wxhOLtCvq8R1U9vb.upTCubI6Rb4O','0.00','0.00','1','890475DA',NULL,'active','2026-03-01 11:53:16');
INSERT INTO users VALUES ('8','Mem85360','6381196738',NULL,'$2y$10$JYsdBmirgjbR/4JH5ugyI.JdZ0RoD1mkSfnKl7/tdmVMXsRI.jq1a','0.00','0.00','1','DBE040AF',NULL,'active','2026-03-01 20:01:13');
INSERT INTO users VALUES ('9','Mem13760','1234567890',NULL,'$2y$10$ghc8Gp9QnsP2TkQwULoLIu7CjuP75X2tN3iRfjIOWLLGZ4tNE0N9e','0.00','0.00','1','06C3A34C',NULL,'active','2026-03-02 12:20:39');
INSERT INTO users VALUES ('10','Mem35505','9905954332',NULL,'$2y$10$IgXinz1NF.7xLOBgjs7hkuaLD./f7dOAXbPP23/siBfm7ZdiuLkmC','0.00','0.00','1','D19D1C14',NULL,'active','2026-03-04 18:55:15');
INSERT INTO users VALUES ('11','Mem67935','7000000000',NULL,'$2y$10$QBIHsWv55KkV1CgNqiWzvuIj0DKtyOjqe1TYkcSW5/bL0idj27nIO','0.00','0.00','1','EC3B93DB',NULL,'active','2026-03-04 19:23:35');
INSERT INTO users VALUES ('12','Mem84089','1709024213',NULL,'$2y$10$NobLi42rmAt63VFFTPCR4ux/ACCMrKUVKnE5P9CVITiV2Z3095SN2','0.00','0.00','1','13442F23',NULL,'active','2026-08-09 00:40:51');
INSERT INTO users VALUES ('13','Mem86202','1843340015',NULL,'$2y$10$HuPRB9bLLsYPgiefqu.moe17RlqyNyAZrV4ptm7Iw9hcFHsRxLmCK','0.00','0.00','1','340249F5',NULL,'active','2026-08-17 06:06:56');
INSERT INTO users VALUES ('14','Mem86782','0130000000',NULL,'$2y$10$4BiFH9w7EWZxeDe3b/iZ9eJvnPVFB6VKVOd3d.mdFadfseHrWPb3W','0.00','0.00','1','1D5805E4',NULL,'active','2026-08-18 03:04:46');
INSERT INTO users VALUES ('15','Mem67642','1234555555',NULL,'$2y$10$ZEjctTIhaXAK1MQ7XDrES.xvUzyWX/gbVKnWukqU/vMac1qJfgpmC','0.00','0.00','1','FF97BD07',NULL,'active','2026-08-27 07:08:24');
INSERT INTO users VALUES ('16','Mem41444','9000593607',NULL,'$2y$10$84uxj2D2Sz9W0ShhscqYd.lrxfGY7ZzZz0K4U6TAwcl64p.sMnffm','0.00','0.00','1','20D2E5D6',NULL,'active','2026-09-01 17:28:58');
INSERT INTO users VALUES ('17','Mem87310','8279958497',NULL,'$2y$10$41BD/.VvBVQODObXWZZ9ge/vROnbsGEzsx8CuNAjpUNuHICXJzZdO','0.00','0.00','1','60BA4A82',NULL,'active','2026-09-01 17:29:21');
INSERT INTO users VALUES ('18','Mem97879','7398134001',NULL,'$2y$10$NJbsqvcgyhoyg/mmGe4aZekY5//PDYz5yfGmIKBPeYoGEwRBdKIVu','0.00','0.00','1','FE6CA892',NULL,'active','2026-09-01 19:27:18');

DROP TABLE IF EXISTS vip_history;
CREATE TABLE `vip_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `exp_change` decimal(10,2) NOT NULL,
  `type` enum('bonus','received','downgrade','maintenance') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


DROP TABLE IF EXISTS vip_levels;
CREATE TABLE `vip_levels` (
  `level` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `required_recharge` decimal(15,2) NOT NULL,
  `monthly_bonus` decimal(15,2) DEFAULT 0.00,
  `level_up_bonus` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO vip_levels VALUES ('1','','30000.00','90.00','180.00');
INSERT INTO vip_levels VALUES ('2','','400000.00','188.00','499.00');
INSERT INTO vip_levels VALUES ('3','','1000000.00','4999.00','16000.00');

DROP TABLE IF EXISTS wallets;
CREATE TABLE `wallets` (
  `user_id` int(11) NOT NULL,
  `main_balance` decimal(15,2) DEFAULT 0.00,
  `bonus_balance` decimal(15,2) DEFAULT 0.00,
  `total_recharge` decimal(15,2) DEFAULT 0.00,
  `total_withdrawal` decimal(15,2) DEFAULT 0.00,
  PRIMARY KEY (`user_id`),
  CONSTRAINT `wallets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO wallets VALUES ('1','5000.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('2','10000.00','500.00','0.00','0.00');
INSERT INTO wallets VALUES ('3','8.17','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('4','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('5','0.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('6','8.85','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('7','70.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('8','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('9','51.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('10','51.83','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('11','30.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('12','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('13','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('14','49.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('15','51.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('16','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('17','50.00','0.00','0.00','0.00');
INSERT INTO wallets VALUES ('18','48.00','0.00','0.00','0.00');

DROP TABLE IF EXISTS withdraw_requests;
CREATE TABLE `withdraw_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `net_amount` decimal(15,2) NOT NULL,
  `fee` decimal(15,2) DEFAULT 0.00,
  `payment_method` varchar(50) NOT NULL,
  `bank_detail_id` int(11) DEFAULT NULL,
  `upi_detail_id` int(11) DEFAULT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `created_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `idx_withdraw_status` (`status`),
  CONSTRAINT `withdraw_requests_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;


SET FOREIGN_KEY_CHECKS=1;
