-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 04, 2025 at 02:59 PM
-- Server version: 9.1.0
-- PHP Version: 8.3.14

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `mips`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--
CREATE DATABASE mips;
use mips;

DROP TABLE IF EXISTS `admin`;
CREATE TABLE IF NOT EXISTS `admin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `username`, `password`) VALUES
(1, 'Admin', '$2y$10$ADf4/1ZvpaBdeZ5s7jcuyeQeQAetiktyifwuxfBi3tbi/p.TXmQuO');

-- --------------------------------------------------------

--
-- Table structure for table `attendance`
--

DROP TABLE IF EXISTS `attendance`;
CREATE TABLE IF NOT EXISTS `attendance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `checkin_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `participant_type` varchar(255) NOT NULL,
  `fullname` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `attendance`
--

INSERT INTO `attendance` (`id`, `user_id`, `checkin_time`, `participant_type`, `fullname`) VALUES
(8, 1, '2025-08-04 15:51:15', 'Deligates', 'Dean Magombo'),
(7, 3, '2025-08-04 11:28:46', 'Speaker', 'August'),
(6, 1, '2025-08-04 11:28:25', 'Deligates', 'Dean Magombo'),
(9, 11, '2025-08-04 15:51:52', 'Sponsor', 'qed'),
(10, 2, '2025-08-04 15:51:56', 'Sponsor', 'Jayne Mago'),
(11, 3, '2025-08-04 15:52:01', 'Speaker', 'August'),
(12, 4, '2025-08-04 15:52:05', 'Service Provider', 'June'),
(13, 5, '2025-08-04 15:52:08', 'Sponsor', 'wwww'),
(14, 6, '2025-08-04 15:52:12', 'Staff', 'q'),
(15, 8, '2025-08-04 15:52:16', 'Sponsor', 'e'),
(16, 7, '2025-08-04 15:52:21', 'Staff', 'w'),
(17, 9, '2025-08-04 15:52:32', 'Sponsor', 'August'),
(18, 10, '2025-08-04 15:52:38', 'Speaker', 'rf'),
(19, 22, '2025-08-04 16:13:10', 'Service Provider', 'ddddddddddddddddd'),
(20, 21, '2025-08-04 16:13:20', 'Sponsor', 'dddddddddddd'),
(21, 20, '2025-08-04 16:13:25', 'Deligates', 'eeeeeeeeeeeee'),
(22, 19, '2025-08-04 16:13:29', 'Staff', 'sdf'),
(23, 18, '2025-08-04 16:14:02', 'Sponsor', 'fgb'),
(24, 17, '2025-08-04 16:14:06', 'Sponsor', 'Dean Mo'),
(25, 16, '2025-08-04 16:14:16', 'Sponsor', 'tg'),
(26, 15, '2025-08-04 16:14:23', 'Staff', '4ddddd'),
(27, 14, '2025-08-04 16:14:33', 'Sponsor', '4re');

-- --------------------------------------------------------

--
-- Table structure for table `meal_deductions`
--

DROP TABLE IF EXISTS `meal_deductions`;
CREATE TABLE IF NOT EXISTS `meal_deductions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` varchar(50) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `meal_type` enum('Lunch','Dinner') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `meal_deductions`
--

INSERT INTO `meal_deductions` (`id`, `user_id`, `name`, `time`, `meal_type`) VALUES
(9, '1', 'Dean Magombo', '2025-08-04 15:18:24', 'Dinner'),
(8, '3', 'August', '2025-08-04 15:17:58', 'Dinner'),
(7, '1', 'Dean Magombo', '2025-08-04 13:12:54', 'Lunch'),
(6, '3', 'August', '2025-08-04 13:12:49', 'Lunch'),
(10, '11', 'qed', '2025-08-04 15:55:21', 'Dinner'),
(11, '10', 'rf', '2025-08-04 15:55:29', 'Dinner'),
(12, '9', 'August', '2025-08-04 15:55:33', 'Dinner'),
(13, '7', 'w', '2025-08-04 15:55:44', 'Dinner'),
(14, '6', 'q', '2025-08-04 15:55:49', 'Dinner'),
(15, '8', 'e', '2025-08-04 15:55:53', 'Dinner'),
(16, '5', 'wwww', '2025-08-04 15:56:08', 'Dinner'),
(17, '4', 'June', '2025-08-04 15:56:11', 'Dinner'),
(18, '2', 'Jayne Mago', '2025-08-04 15:56:18', 'Dinner'),
(19, '23', 'Dean Magombo', '2025-08-04 16:41:40', 'Dinner'),
(20, '13', 'eerd', '2025-08-04 16:41:48', 'Dinner'),
(21, '14', '4re', '2025-08-04 16:42:00', 'Dinner'),
(22, '15', '4ddddd', '2025-08-04 16:42:05', 'Dinner'),
(23, '16', 'tg', '2025-08-04 16:42:16', 'Dinner'),
(24, '17', 'Dean Mo', '2025-08-04 16:42:20', 'Dinner'),
(25, '18', 'fgb', '2025-08-04 16:42:23', 'Dinner'),
(26, '19', 'sdf', '2025-08-04 16:42:27', 'Dinner'),
(27, '21', 'dddddddddddd', '2025-08-04 16:42:36', 'Dinner'),
(28, '22', 'ddddddddddddddddd', '2025-08-04 16:42:41', 'Dinner');

-- --------------------------------------------------------

--
-- Table structure for table `promotional_materials`
--

DROP TABLE IF EXISTS `promotional_materials`;
CREATE TABLE IF NOT EXISTS `promotional_materials` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `material_collected` varchar(255) NOT NULL DEFAULT 'Yes',
  `collection_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `status` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sub_user`
--

DROP TABLE IF EXISTS `sub_user`;
CREATE TABLE IF NOT EXISTS `sub_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `fullname` varchar(250) NOT NULL,
  `email` varchar(250) NOT NULL,
  `phone` varchar(50) NOT NULL,
  `gender` varchar(10) NOT NULL,
  `password` varchar(200) NOT NULL,
  `role` varchar(50) NOT NULL DEFAULT 'sub_admin',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sub_user`
--

INSERT INTO `sub_user` (`id`, `fullname`, `email`, `phone`, `gender`, `password`, `role`) VALUES
(1, 'Jayne Mago', 'user@gmail.com', '+265883573037', 'Female', '$2y$10$9sywi3DINtErRnliHrB17ubAKDb9sPotCKQRzaZdX1IrxLuImygXi', 'sub_admin');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `participant_type` varchar(100) NOT NULL,
  `fullname` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phone` varchar(50) NOT NULL,
  `payment_status` enum('Paid','Not Paid') NOT NULL,
  `commitment_status` enum('Approved') DEFAULT NULL,
  `hotel` varchar(50) NOT NULL,
  `institution` varchar(150) NOT NULL,
  `membership_type` varchar(100) NOT NULL,
  `qr_code` text,
  `meals_allocated` int DEFAULT '0',
  `meals_remaining` int DEFAULT '0',
  `promotion_material` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `participant_type`, `fullname`, `email`, `phone`, `payment_status`, `commitment_status`, `hotel`, `institution`, `membership_type`, `qr_code`, `meals_allocated`, `meals_remaining`, `promotion_material`) VALUES
(1, 'Deligates', 'Dean Magombo', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Participation_only', 'Game', 'Corporate', 'qrcodes/user_1.png', 6, 6, NULL),
(2, 'Sponsor', 'Jayne Mago', 'user@gmail.com', '+265883573037', 'Not Paid', 'Approved', 'Ekhaya', 'Game', 'Foreign', 'qrcodes/user_2.png', 2, 2, NULL),
(3, 'Speaker', 'August', 'dean@gmail.com', '+265883573037', 'Paid', NULL, 'Nkopola', 'Game', 'Foreign', 'qrcodes/user_3.png', 4, 4, NULL),
(4, 'Service Provider', 'June', 'diniw@gmail', '+265883573037', 'Paid', NULL, 'Ekhaya', 'AA', 'Student', 'qrcodes/user_4.png', 5, 5, NULL),
(5, 'Sponsor', 'wwww', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Ekhaya', 'AA', 'Corporate', 'qrcodes/user_5.png', 6, 6, NULL),
(6, 'Staff', 'q', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Participation_only', 'AA', 'Foreign', 'qrcodes/user_6.png', 3, 3, NULL),
(7, 'Staff', 'w', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Ekhaya', 'Game', 'Foreign', 'qrcodes/user_7.png', 2, 2, NULL),
(8, 'Sponsor', 'e', 'diniw@gmail', '+265883573037', 'Paid', NULL, 'Participation_only', 'Game', 'Corporate', 'qrcodes/user_8.png', 4, 4, NULL),
(9, 'Sponsor', 'August', '21@gmail.com', '+265883573037', 'Not Paid', 'Approved', 'Ekhaya', 'Game', 'Foreign', 'qrcodes/user_9.png', 3, 3, NULL),
(10, 'Speaker', 'rf', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Nkopola', 'Game', 'Corporate', 'qrcodes/user_10.png', 3, 3, NULL),
(11, 'Sponsor', 'qed', 'dean@gmail.com', '+265883573037', 'Paid', NULL, 'Participation_only', 'Game', 'Full Member', 'qrcodes/user_11.png', 3, 3, NULL),
(12, 'Sponsor', 'cd', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Ekhaya', 'Game', 'Foreign', 'qrcodes/user_12.png', 5, 5, NULL),
(13, 'Deligates', 'eerd', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Participation_only', 'Game', 'Corporate', 'qrcodes/user_13.png', 4, 4, NULL),
(14, 'Sponsor', '4re', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Club Makokola', 'AA', 'Student', 'qrcodes/user_14.png', 4, 4, NULL),
(15, 'Staff', '4ddddd', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Participation_only', 'AA', 'Corporate', 'qrcodes/user_15.png', 4, 4, NULL),
(16, 'Sponsor', 'tg', 'magombodean84@gmail.com', '+265883573037', 'Not Paid', NULL, 'Club Makokola', 'AA', 'Corporate', 'qrcodes/user_16.png', 5, 5, NULL),
(17, 'Sponsor', 'Dean Mo', 'diniw@gmail', '+265883573037', 'Paid', NULL, 'Participation_only', 'Game', 'Foreign', 'qrcodes/user_17.png', 5, 5, NULL),
(18, 'Sponsor', 'fgb', 'diniw@gmail', '+265883573037', 'Paid', NULL, 'Club Makokola', 'fgh', 'Corporate', 'qrcodes/user_18.png', 4, 4, NULL),
(19, 'Staff', 'sdf', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Nkopola', 'Game', 'Student', 'qrcodes/user_19.png', 3, 3, NULL),
(20, 'Deligates', 'eeeeeeeeeeeee', 'diniw@gmail', '+265883573037', 'Not Paid', 'Approved', 'Club Makokola', 'AA', 'Foreign', 'qrcodes/user_20.png', 0, 0, NULL),
(21, 'Sponsor', 'dddddddddddd', 'magombodean84@gmail.com', '+265883573037', 'Paid', NULL, 'Club Makokola', 'fgh', 'Foreign', 'qrcodes/user_21.png', 3, 3, NULL),
(22, 'Service Provider', 'ddddddddddddddddd', 'diniw@gmail', '+265883573037', 'Paid', NULL, 'Ekhaya', 'ddddd', 'Foreign', 'qrcodes/user_22.png', 4, 4, NULL),
(23, 'Speaker', 'Dean Magombo', 'user@gmail.com', '+265883573037', 'Paid', NULL, 'Meals Only', 'AA', 'Foreign', 'qrcodes/user_23.png', 3, 3, NULL);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
