-- MySQL dump 10.13  Distrib 8.0.46, for Linux (x86_64)
--
-- Host: localhost    Database: Database operations hfineart_amra93
-- ------------------------------------------------------
-- Server version	8.0.46

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `hfineart_amra93`
--

/*!40000 DROP DATABASE IF EXISTS `hfineart_amra93`*/;

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `hfineart_amra93` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `hfineart_amra93`;

--
-- Table structure for table `audit_logs`
--

DROP TABLE IF EXISTS `audit_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `audit_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int unsigned DEFAULT NULL,
  `action` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `entity_type` varchar(60) COLLATE utf8mb4_general_ci NOT NULL,
  `entity_id` int unsigned DEFAULT NULL,
  `description` text COLLATE utf8mb4_general_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `entity_type` (`entity_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `audit_logs`
--

LOCK TABLES `audit_logs` WRITE;
/*!40000 ALTER TABLE `audit_logs` DISABLE KEYS */;
/*!40000 ALTER TABLE `audit_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `districts`
--

DROP TABLE IF EXISTS `districts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `districts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `division_id` int unsigned NOT NULL,
  `name_en` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `name_bn` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `division_id` (`division_id`),
  CONSTRAINT `districts_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `divisions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `districts`
--

LOCK TABLES `districts` WRITE;
/*!40000 ALTER TABLE `districts` DISABLE KEYS */;
INSERT INTO `districts` VALUES (1,1,'Barguna','বরগুনা'),(2,1,'Barishal','বরিশাল'),(3,1,'Bhola','ভোলা'),(4,1,'Jhalokati','ঝালকাঠি'),(5,1,'Patuakhali','পটুয়াখালী'),(6,1,'Pirojpur','পিরোজপুর'),(7,2,'Bandarban','বান্দরবান'),(8,2,'Brahmanbaria','ব্রাহ্মণবাড়িয়া'),(9,2,'Chandpur','চাঁদপুর'),(10,2,'Chattogram','চট্টগ্রাম'),(11,2,'Cumilla','কুমিল্লা'),(12,2,'Cox\'s Bazar','কক্সবাজার'),(13,2,'Feni','ফেনী'),(14,2,'Khagrachhari','খাগড়াছড়ি'),(15,2,'Lakshmipur','লক্ষ্মীপুর'),(16,2,'Noakhali','নোয়াখালী'),(17,2,'Rangamati','রাঙ্গামাটি'),(18,3,'Dhaka','ঢাকা'),(19,3,'Faridpur','ফরিদপুর'),(20,3,'Gazipur','গাজীপুর'),(21,3,'Gopalganj','গোপালগঞ্জ'),(22,3,'Kishoreganj','কিশোরগঞ্জ'),(23,3,'Madaripur','মাদারীপুর'),(24,3,'Manikganj','মানিকগঞ্জ'),(25,3,'Munshiganj','মুন্সিগঞ্জ'),(26,3,'Narayanganj','নারায়ণগঞ্জ'),(27,3,'Narsingdi','নরসিংদী'),(28,3,'Rajbari','রাজবাড়ী'),(29,3,'Shariatpur','শরীয়তপুর'),(30,3,'Tangail','টাঙ্গাইল'),(31,4,'Bagerhat','বাগেরহাট'),(32,4,'Chuadanga','চুয়াডাঙ্গা'),(33,4,'Jashore','যশোর'),(34,4,'Jhenaidah','ঝিনাইদহ'),(35,4,'Khulna','খুলনা'),(36,4,'Kushtia','কুষ্টিয়া'),(37,4,'Magura','মাগুরা'),(38,4,'Meherpur','মেহেরপুর'),(39,4,'Narail','নড়াইল'),(40,4,'Satkhira','সাতক্ষীরা'),(41,5,'Jamalpur','জামালপুর'),(42,5,'Mymensingh','ময়মনসিংহ'),(43,5,'Netrokona','নেত্রকোনা'),(44,5,'Sherpur','শেরপুর'),(45,6,'Bogura','বগুড়া'),(46,6,'Joypurhat','জয়পুরহাট'),(47,6,'Naogaon','নওগাঁ'),(48,6,'Natore','নাটোর'),(49,6,'Chapainawabganj','চাঁপাইনবাবগঞ্জ'),(50,6,'Pabna','পাবনা'),(51,6,'Rajshahi','রাজশাহী'),(52,6,'Sirajganj','সিরাজগঞ্জ'),(53,7,'Dinajpur','দিনাজপুর'),(54,7,'Gaibandha','গাইবান্ধা'),(55,7,'Kurigram','কুড়িগ্রাম'),(56,7,'Lalmonirhat','লালমনিরহাট'),(57,7,'Nilphamari','নীলফামারী'),(58,7,'Panchagarh','পঞ্চগড়'),(59,7,'Rangpur','রংপুর'),(60,7,'Thakurgaon','ঠাকুরগাঁও'),(61,8,'Habiganj','হবিগঞ্জ'),(62,8,'Moulvibazar','মৌলভীবাজার'),(63,8,'Sunamganj','সুনামগঞ্জ'),(64,8,'Sylhet','সিলেট');
/*!40000 ALTER TABLE `districts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `divisions`
--

DROP TABLE IF EXISTS `divisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `divisions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name_en` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `name_bn` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `sort_order` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `divisions`
--

LOCK TABLES `divisions` WRITE;
/*!40000 ALTER TABLE `divisions` DISABLE KEYS */;
INSERT INTO `divisions` VALUES (1,'Barishal','বরিশাল',1),(2,'Chattogram','চট্টগ্রাম',2),(3,'Dhaka','ঢাকা',3),(4,'Khulna','খুলনা',4),(5,'Mymensingh','ময়মনসিংহ',5),(6,'Rajshahi','রাজশাহী',6),(7,'Rangpur','রংপুর',7),(8,'Sylhet','সিলেট',8);
/*!40000 ALTER TABLE `divisions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `event_entry_logs`
--

DROP TABLE IF EXISTS `event_entry_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `event_entry_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `program_id` int unsigned DEFAULT NULL,
  `participant_id` int unsigned DEFAULT NULL,
  `token` varchar(80) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `result` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `message` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `actor_id` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `program_id` (`program_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `event_entry_logs`
--

LOCK TABLES `event_entry_logs` WRITE;
/*!40000 ALTER TABLE `event_entry_logs` DISABLE KEYS */;
/*!40000 ALTER TABLE `event_entry_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `media_files`
--

DROP TABLE IF EXISTS `media_files`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `media_files` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `owner_type` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `owner_id` int unsigned NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `mime` varchar(80) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `size_bytes` int unsigned NOT NULL DEFAULT '0',
  `created_by` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `media_files`
--

LOCK TABLES `media_files` WRITE;
/*!40000 ALTER TABLE `media_files` DISABLE KEYS */;
/*!40000 ALTER TABLE `media_files` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `member_addresses`
--

DROP TABLE IF EXISTS `member_addresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_addresses` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL,
  `address_type` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `address` text COLLATE utf8mb4_general_ci NOT NULL,
  `district_id` int unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `member_addresses_member_id_foreign` (`member_id`),
  CONSTRAINT `member_addresses_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `member_addresses`
--

LOCK TABLES `member_addresses` WRITE;
/*!40000 ALTER TABLE `member_addresses` DISABLE KEYS */;
/*!40000 ALTER TABLE `member_addresses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `member_contacts`
--

DROP TABLE IF EXISTS `member_contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_contacts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL,
  `label` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_contacts_member_id_foreign` (`member_id`),
  CONSTRAINT `member_contacts_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `member_contacts`
--

LOCK TABLES `member_contacts` WRITE;
/*!40000 ALTER TABLE `member_contacts` DISABLE KEYS */;
/*!40000 ALTER TABLE `member_contacts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `member_id_cards`
--

DROP TABLE IF EXISTS `member_id_cards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_id_cards` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL,
  `card_no` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `qr_token_id` int unsigned NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'active',
  `issued_at` datetime DEFAULT NULL,
  `issued_by` int unsigned DEFAULT NULL,
  `replaced_from` int unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id_cards_qr_token_id_foreign` (`qr_token_id`),
  KEY `member_id` (`member_id`),
  CONSTRAINT `member_id_cards_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `member_id_cards_qr_token_id_foreign` FOREIGN KEY (`qr_token_id`) REFERENCES `qr_tokens` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `member_id_cards`
--

LOCK TABLES `member_id_cards` WRITE;
/*!40000 ALTER TABLE `member_id_cards` DISABLE KEYS */;
INSERT INTO `member_id_cards` VALUES (1,1,'93000001',1,'active','2026-10-31 22:34:42',1,NULL);
/*!40000 ALTER TABLE `member_id_cards` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `members`
--

DROP TABLE IF EXISTS `members`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `members` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int unsigned DEFAULT NULL,
  `member_code` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `full_name` varchar(150) COLLATE utf8mb4_general_ci NOT NULL,
  `photo_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `school_id` int unsigned DEFAULT NULL,
  `school_name` varchar(200) COLLATE utf8mb4_general_ci NOT NULL,
  `school_district_id` int unsigned NOT NULL,
  `father_name` varchar(150) COLLATE utf8mb4_general_ci NOT NULL,
  `mother_name` varchar(150) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `dob` date NOT NULL,
  `gender` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `blood_group` varchar(5) COLLATE utf8mb4_general_ci NOT NULL,
  `nid` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mobile` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `additional_mobile` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email` varchar(150) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `emergency_contact` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `emergency_relation` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `facebook_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `present_address` text COLLATE utf8mb4_general_ci NOT NULL,
  `current_district_id` int unsigned NOT NULL,
  `home_district_id` int unsigned NOT NULL,
  `home_division_id` int unsigned NOT NULL,
  `office_name` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `office_address` text COLLATE utf8mb4_general_ci,
  `office_district_id` int unsigned DEFAULT NULL,
  `occupation_id` int unsigned DEFAULT NULL,
  `occupation_other` varchar(150) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(40) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'draft',
  `approved_at` datetime DEFAULT NULL,
  `approved_by` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  UNIQUE KEY `member_code` (`member_code`),
  KEY `members_current_district_id_foreign` (`current_district_id`),
  KEY `members_home_district_id_foreign` (`home_district_id`),
  KEY `members_home_division_id_foreign` (`home_division_id`),
  KEY `mobile` (`mobile`),
  KEY `status` (`status`),
  KEY `school_district_id` (`school_district_id`),
  CONSTRAINT `members_current_district_id_foreign` FOREIGN KEY (`current_district_id`) REFERENCES `districts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `members_home_district_id_foreign` FOREIGN KEY (`home_district_id`) REFERENCES `districts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `members_home_division_id_foreign` FOREIGN KEY (`home_division_id`) REFERENCES `divisions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `members_school_district_id_foreign` FOREIGN KEY (`school_district_id`) REFERENCES `districts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `members`
--

LOCK TABLES `members` WRITE;
/*!40000 ALTER TABLE `members` DISABLE KEYS */;
INSERT INTO `members` VALUES (1,4,'93000001','Karim Uddin',NULL,1,'Rajshahi Collegiate School',51,'Abdul Karim','Ayesha Begum','1977-03-12','Male','B+',NULL,'01710000004',NULL,'karim@amra93.org',NULL,NULL,NULL,'Rajshahi Sadar',51,51,6,NULL,NULL,NULL,9,NULL,'approved','2026-10-31 22:34:42',2,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(2,5,NULL,'Rahim Ahmed',NULL,NULL,'Dhaka Collegiate School',18,'Mokbul Ahmed',NULL,'1978-08-20','Male','O+',NULL,'01710000005',NULL,'rahim@amra93.org',NULL,NULL,NULL,'Dhanmondi, Dhaka',18,18,3,NULL,NULL,NULL,11,NULL,'pending_verification',NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL);
/*!40000 ALTER TABLE `members` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `membership_applications`
--

DROP TABLE IF EXISTS `membership_applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `membership_applications` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL,
  `user_id` int unsigned NOT NULL,
  `status` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `verifier_user_id` int unsigned DEFAULT NULL,
  `verified_at` datetime DEFAULT NULL,
  `submitted_at` datetime DEFAULT NULL,
  `notes` text COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `membership_applications_member_id_foreign` (`member_id`),
  KEY `membership_applications_user_id_foreign` (`user_id`),
  KEY `status` (`status`),
  CONSTRAINT `membership_applications_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `membership_applications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `membership_applications`
--

LOCK TABLES `membership_applications` WRITE;
/*!40000 ALTER TABLE `membership_applications` DISABLE KEYS */;
INSERT INTO `membership_applications` VALUES (1,1,4,'approved',NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42'),(2,2,5,'pending_verification',NULL,NULL,'2026-10-31 22:34:42',NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `membership_applications` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `membership_approvals`
--

DROP TABLE IF EXISTS `membership_approvals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `membership_approvals` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `application_id` int unsigned NOT NULL,
  `member_id` int unsigned NOT NULL,
  `actor_id` int unsigned NOT NULL,
  `action` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `remarks` text COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `membership_approvals_application_id_foreign` (`application_id`),
  CONSTRAINT `membership_approvals_application_id_foreign` FOREIGN KEY (`application_id`) REFERENCES `membership_applications` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `membership_approvals`
--

LOCK TABLES `membership_approvals` WRITE;
/*!40000 ALTER TABLE `membership_approvals` DISABLE KEYS */;
/*!40000 ALTER TABLE `membership_approvals` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `migrations`
--

DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `version` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `class` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `group` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `namespace` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `time` int NOT NULL,
  `batch` int unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `migrations`
--

LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` VALUES (1,'2026-10-31-100000','App\\Database\\Migrations\\CreateAmraSchema','default','App',1793464481,1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `notifications`
--

DROP TABLE IF EXISTS `notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notifications` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int unsigned DEFAULT NULL,
  `channel` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `event_key` varchar(60) COLLATE utf8mb4_general_ci NOT NULL,
  `subject` varchar(200) COLLATE utf8mb4_general_ci NOT NULL,
  `body` text COLLATE utf8mb4_general_ci,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'logged',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `notifications`
--

LOCK TABLES `notifications` WRITE;
/*!40000 ALTER TABLE `notifications` DISABLE KEYS */;
/*!40000 ALTER TABLE `notifications` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `occupations`
--

DROP TABLE IF EXISTS `occupations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `occupations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_general_ci NOT NULL,
  `sort_order` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `occupations`
--

LOCK TABLES `occupations` WRITE;
/*!40000 ALTER TABLE `occupations` DISABLE KEYS */;
INSERT INTO `occupations` VALUES (1,'Government Employee',1),(2,'Private Company Employee',2),(3,'Business Owner',3),(4,'Entrepreneur',4),(5,'Self-Employed',5),(6,'Freelancer',6),(7,'Doctor',7),(8,'Nurse',8),(9,'Teacher',9),(10,'Lecturer / Professor',10),(11,'Engineer',11),(12,'IT Professional / Software Developer',12),(13,'Accountant',13),(14,'Banker',14),(15,'Data Analyst',15),(16,'Business Analyst',16),(17,'Lawyer / Advocate',17),(18,'Consultant',18),(19,'Sales & Marketing Professional',19),(20,'Merchandiser',20),(21,'Garment Worker',21),(22,'Factory Worker',22),(23,'Skilled Technician',23),(24,'Driver',24),(25,'Transport Worker',25),(26,'Farmer / Agricultural Worker',26),(27,'Fisherman',27),(28,'Day Laborer',28),(29,'Construction Worker',29),(30,'Shopkeeper / Retailer',30),(31,'Trader / Wholesaler',31),(32,'Housewife / Homemaker',32),(33,'Unemployed',33),(34,'Retired',34),(35,'Other',35);
/*!40000 ALTER TABLE `occupations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `otp_verifications`
--

DROP TABLE IF EXISTS `otp_verifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `otp_verifications` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int unsigned DEFAULT NULL,
  `mobile` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email` varchar(150) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `purpose` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `context_id` int unsigned DEFAULT NULL,
  `code_hash` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `attempts` int unsigned NOT NULL DEFAULT '0',
  `expires_at` datetime NOT NULL,
  `consumed_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mobile_purpose` (`mobile`,`purpose`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `otp_verifications`
--

LOCK TABLES `otp_verifications` WRITE;
/*!40000 ALTER TABLE `otp_verifications` DISABLE KEYS */;
/*!40000 ALTER TABLE `otp_verifications` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_logs`
--

DROP TABLE IF EXISTS `payment_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `payment_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `payment_id` int unsigned NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `note` text COLLATE utf8mb4_general_ci,
  `actor_id` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `payment_logs_payment_id_foreign` (`payment_id`),
  CONSTRAINT `payment_logs_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_logs`
--

LOCK TABLES `payment_logs` WRITE;
/*!40000 ALTER TABLE `payment_logs` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payments`
--

DROP TABLE IF EXISTS `payments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `payments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `registration_id` int unsigned NOT NULL,
  `method` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `trx_id` varchar(80) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'unpaid',
  `paid_at` datetime DEFAULT NULL,
  `verified_by` int unsigned DEFAULT NULL,
  `receipt_no` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `payments_registration_id_foreign` (`registration_id`),
  KEY `status` (`status`),
  CONSTRAINT `payments_registration_id_foreign` FOREIGN KEY (`registration_id`) REFERENCES `program_registrations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payments`
--

LOCK TABLES `payments` WRITE;
/*!40000 ALTER TABLE `payments` DISABLE KEYS */;
INSERT INTO `payments` VALUES (1,1,'cash',2500.00,NULL,'paid','2026-10-31 22:34:42',3,'PAY202600001',NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `payments` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permissions`
--

DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(120) COLLATE utf8mb4_general_ci NOT NULL,
  `slug` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `module` varchar(60) COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permissions`
--

LOCK TABLES `permissions` WRITE;
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
INSERT INTO `permissions` VALUES (1,'Dashboard View','dashboard.view','Dashboard'),(2,'Profile Manage','profile.manage','Profile'),(3,'Membership Apply','membership.apply','Membership'),(4,'Membership Approve','membership.approve','Membership'),(5,'Members View','members.view','Members'),(6,'Members Edit','members.edit','Members'),(7,'Members Edit Limited','members.edit.limited','Members'),(8,'Members Delete','members.delete','Members'),(9,'Members Export','members.export','Members'),(10,'Members Import','members.import','Members'),(11,'Programs View','programs.view','Programs'),(12,'Programs Create','programs.create','Programs'),(13,'Programs Approve','programs.approve','Programs'),(14,'Programs Publish','programs.publish','Programs'),(15,'Registrations Create','registrations.create','Registration'),(16,'Registrations Manage','registrations.manage','Registration'),(17,'Payments View','payments.view','Payments'),(18,'Payments Verify','payments.verify','Payments'),(19,'Attendance Manage','attendance.manage','Events'),(20,'Volunteers Manage','volunteers.manage','Events'),(21,'Guests Manage','guests.manage','Events'),(22,'Qr Scan','qr.scan','Events'),(23,'Idcard Own','idcard.own','ID cards'),(24,'Idcard Manage','idcard.manage','ID cards'),(25,'Reports Own','reports.own','Reports'),(26,'Reports Assigned','reports.assigned','Reports'),(27,'Reports All','reports.all','Reports'),(28,'Notifications View','notifications.view','Notifications'),(29,'Users Manage','users.manage','Settings'),(30,'Settings Manage','settings.manage','Settings'),(31,'Directory View','directory.view','Directory');
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `program_approvals`
--

DROP TABLE IF EXISTS `program_approvals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `program_approvals` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `program_id` int unsigned NOT NULL,
  `actor_id` int unsigned NOT NULL,
  `action` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `remarks` text COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `program_approvals_program_id_foreign` (`program_id`),
  CONSTRAINT `program_approvals_program_id_foreign` FOREIGN KEY (`program_id`) REFERENCES `programs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `program_approvals`
--

LOCK TABLES `program_approvals` WRITE;
/*!40000 ALTER TABLE `program_approvals` DISABLE KEYS */;
/*!40000 ALTER TABLE `program_approvals` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `program_attendance`
--

DROP TABLE IF EXISTS `program_attendance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `program_attendance` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `program_id` int unsigned NOT NULL,
  `participant_id` int unsigned NOT NULL,
  `registration_id` int unsigned NOT NULL,
  `checked_in_at` datetime DEFAULT NULL,
  `checked_in_by` int unsigned NOT NULL,
  `method` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'qr',
  PRIMARY KEY (`id`),
  UNIQUE KEY `participant_id` (`participant_id`),
  KEY `program_id` (`program_id`),
  CONSTRAINT `program_attendance_participant_id_foreign` FOREIGN KEY (`participant_id`) REFERENCES `registration_participants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `program_attendance`
--

LOCK TABLES `program_attendance` WRITE;
/*!40000 ALTER TABLE `program_attendance` DISABLE KEYS */;
/*!40000 ALTER TABLE `program_attendance` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `program_pricing`
--

DROP TABLE IF EXISTS `program_pricing`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `program_pricing` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `program_id` int unsigned NOT NULL,
  `rule_type` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `label` varchar(120) COLLATE utf8mb4_general_ci NOT NULL,
  `division_id` int unsigned DEFAULT NULL,
  `min_age` int DEFAULT NULL,
  `max_age` int DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `program_id` (`program_id`),
  CONSTRAINT `program_pricing_program_id_foreign` FOREIGN KEY (`program_id`) REFERENCES `programs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `program_pricing`
--

LOCK TABLES `program_pricing` WRITE;
/*!40000 ALTER TABLE `program_pricing` DISABLE KEYS */;
INSERT INTO `program_pricing` VALUES (1,1,'member','Member registration',NULL,NULL,NULL,1500.00,1),(2,1,'guest','Guest registration',NULL,NULL,NULL,1000.00,1),(3,1,'child','Child below 12',NULL,NULL,12,700.00,1),(4,1,'driver','Driver charge',NULL,NULL,NULL,500.00,1),(5,1,'gift','স্মারক',NULL,NULL,NULL,300.00,1),(6,1,'division','Rajshahi member fee',6,NULL,NULL,1200.00,1),(7,2,'member','Member registration',NULL,NULL,NULL,1500.00,1),(8,2,'guest','Guest registration',NULL,NULL,NULL,1000.00,1),(9,2,'child','Child below 12',NULL,NULL,12,700.00,1),(10,2,'driver','Driver charge',NULL,NULL,NULL,500.00,1),(11,2,'gift','স্মারক',NULL,NULL,NULL,300.00,1),(12,2,'division','Rajshahi member fee',6,NULL,NULL,1200.00,1),(13,3,'member','Member registration',NULL,NULL,NULL,1500.00,1),(14,3,'guest','Guest registration',NULL,NULL,NULL,1000.00,1),(15,3,'child','Child below 12',NULL,NULL,12,700.00,1),(16,3,'driver','Driver charge',NULL,NULL,NULL,500.00,1),(17,3,'gift','স্মারক',NULL,NULL,NULL,300.00,1),(18,3,'division','Rajshahi member fee',6,NULL,NULL,1200.00,1),(19,4,'member','Member registration',NULL,NULL,NULL,1500.00,1),(20,4,'guest','Guest registration',NULL,NULL,NULL,1000.00,1),(21,4,'child','Child below 12',NULL,NULL,12,700.00,1),(22,4,'driver','Driver charge',NULL,NULL,NULL,500.00,1),(23,4,'gift','স্মারক',NULL,NULL,NULL,300.00,1),(24,4,'division','Rajshahi member fee',6,NULL,NULL,1200.00,1),(25,5,'member','Member registration',NULL,NULL,NULL,1500.00,1),(26,5,'guest','Guest registration',NULL,NULL,NULL,1000.00,1),(27,5,'child','Child below 12',NULL,NULL,12,700.00,1),(28,5,'driver','Driver charge',NULL,NULL,NULL,500.00,1),(29,5,'gift','স্মারক',NULL,NULL,NULL,300.00,1),(30,5,'division','Rajshahi member fee',6,NULL,NULL,1200.00,1);
/*!40000 ALTER TABLE `program_pricing` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `program_registrations`
--

DROP TABLE IF EXISTS `program_registrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `program_registrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `registration_code` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `program_id` int unsigned NOT NULL,
  `user_id` int unsigned NOT NULL,
  `member_id` int unsigned DEFAULT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT '0.00',
  `driver_fee` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payment_status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'unpaid',
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'submitted',
  `needs_driver` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `registration_code` (`registration_code`),
  KEY `program_id` (`program_id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `program_registrations_program_id_foreign` FOREIGN KEY (`program_id`) REFERENCES `programs` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `program_registrations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `program_registrations`
--

LOCK TABLES `program_registrations` WRITE;
/*!40000 ALTER TABLE `program_registrations` DISABLE KEYS */;
INSERT INTO `program_registrations` VALUES (1,'REG202600001',1,4,1,2500.00,0.00,2500.00,'paid','confirmed',0,'2026-10-31 22:34:42','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `program_registrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `programs`
--

DROP TABLE IF EXISTS `programs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `programs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `program_code` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(200) COLLATE utf8mb4_general_ci NOT NULL,
  `category` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `image_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `start_date` date NOT NULL,
  `start_time` varchar(8) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `venue` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `registration_deadline` datetime NOT NULL,
  `capacity` int unsigned NOT NULL DEFAULT '0',
  `status` varchar(30) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'draft',
  `created_by` int unsigned NOT NULL,
  `approved_by` int unsigned DEFAULT NULL,
  `published_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `program_code` (`program_code`),
  KEY `programs_created_by_foreign` (`created_by`),
  KEY `status` (`status`),
  CONSTRAINT `programs_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `programs`
--

LOCK TABLES `programs` WRITE;
/*!40000 ALTER TABLE `programs` DISABLE KEYS */;
INSERT INTO `programs` VALUES (1,'PRG20260001','আমরা ৯৩ রাজশাহী','Reunion','Sample program from the membership workbook. Confirm the real schedule before inviting members.',NULL,'2026-12-16','09:00:00','2026-12-16','রাজশাহী পার্ক','2026-12-15 23:59:59',300,'published',2,2,'2026-10-31 22:34:42','2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(2,'PRG20260002','আমরা ৯৩ কক্সবাজার','Reunion','Sample program from the membership workbook. Confirm the real schedule before inviting members.',NULL,'2027-01-14','09:00:00','2027-01-14','হোটেল XYZ','2027-01-13 23:59:59',300,'published',2,2,'2026-10-31 22:34:42','2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(3,'PRG20260003','আমরা ৯৩, ফেনী','Picnic','Sample program from the membership workbook. Confirm the real schedule before inviting members.',NULL,'2026-12-31','09:00:00','2026-12-31','ইকো পার্ক, কুমিল্লা','2026-12-30 23:59:59',300,'published',2,2,'2026-10-31 22:34:42','2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(4,'PRG20260004','সিলেট বিভাগ ৯৩','Meeting','Sample program from the membership workbook. Confirm the real schedule before inviting members.',NULL,'2026-12-25','09:00:00','2026-12-25','গ্র্যান্ড সুলতান','2026-12-24 23:59:59',300,'published',2,2,'2026-10-31 22:34:42','2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(5,'PRG20260005','আমরা ৯৩ মিরপুর পারিবারিক মিলন মেলা','Reunion','Sample program from the membership workbook. Confirm the real schedule before inviting members.',NULL,'2027-01-05','09:00:00','2027-01-05','ইত্যাদি কমিউনিটি সেন্টার','2027-01-04 23:59:59',300,'published',2,2,'2026-10-31 22:34:42','2026-10-31 22:34:42','2026-10-31 22:34:42',NULL);
/*!40000 ALTER TABLE `programs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `qr_tokens`
--

DROP TABLE IF EXISTS `qr_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `qr_tokens` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `token` varchar(64) COLLATE utf8mb4_general_ci NOT NULL,
  `subject_type` varchar(30) COLLATE utf8mb4_general_ci NOT NULL,
  `subject_id` int unsigned NOT NULL,
  `program_id` int unsigned DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL,
  `revoked_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `token` (`token`),
  KEY `subject_type_subject_id` (`subject_type`,`subject_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `qr_tokens`
--

LOCK TABLES `qr_tokens` WRITE;
/*!40000 ALTER TABLE `qr_tokens` DISABLE KEYS */;
INSERT INTO `qr_tokens` VALUES (1,'5490d55385f646b4ca3f589d5f20984c','member_card',1,NULL,NULL,NULL,'2026-10-31 22:34:48'),(2,'17a1634893da5fb451d7db4d674277ec','participant',1,1,NULL,NULL,'2026-10-31 22:34:49'),(3,'5c347fbb2c148772b6983d3ee1bf429e','participant',2,1,NULL,NULL,'2026-10-31 22:34:49');
/*!40000 ALTER TABLE `qr_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `registration_gifts`
--

DROP TABLE IF EXISTS `registration_gifts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `registration_gifts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `registration_id` int unsigned NOT NULL,
  `participant_id` int unsigned DEFAULT NULL,
  `label` varchar(120) COLLATE utf8mb4_general_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `registration_gifts_registration_id_foreign` (`registration_id`),
  CONSTRAINT `registration_gifts_registration_id_foreign` FOREIGN KEY (`registration_id`) REFERENCES `program_registrations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `registration_gifts`
--

LOCK TABLES `registration_gifts` WRITE;
/*!40000 ALTER TABLE `registration_gifts` DISABLE KEYS */;
/*!40000 ALTER TABLE `registration_gifts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `registration_guests`
--

DROP TABLE IF EXISTS `registration_guests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `registration_guests` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `participant_id` int unsigned NOT NULL,
  `registration_id` int unsigned NOT NULL,
  `invited_by_member_id` int unsigned DEFAULT NULL,
  `category` varchar(40) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'guest',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `registration_guests_participant_id_foreign` (`participant_id`),
  CONSTRAINT `registration_guests_participant_id_foreign` FOREIGN KEY (`participant_id`) REFERENCES `registration_participants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `registration_guests`
--

LOCK TABLES `registration_guests` WRITE;
/*!40000 ALTER TABLE `registration_guests` DISABLE KEYS */;
INSERT INTO `registration_guests` VALUES (1,2,1,1,'guest','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `registration_guests` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `registration_participants`
--

DROP TABLE IF EXISTS `registration_participants`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `registration_participants` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `registration_id` int unsigned NOT NULL,
  `member_id` int unsigned DEFAULT NULL,
  `participant_type` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `full_name` varchar(150) COLLATE utf8mb4_general_ci NOT NULL,
  `mobile` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `age` int DEFAULT NULL,
  `gender` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `relation` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `tshirt_size` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gift_label` varchar(120) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gift_fee` decimal(10,2) NOT NULL DEFAULT '0.00',
  `fee_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `line_total` decimal(10,2) NOT NULL DEFAULT '0.00',
  `division_id` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `registration_id` (`registration_id`),
  KEY `member_id` (`member_id`),
  CONSTRAINT `registration_participants_registration_id_foreign` FOREIGN KEY (`registration_id`) REFERENCES `program_registrations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `registration_participants`
--

LOCK TABLES `registration_participants` WRITE;
/*!40000 ALTER TABLE `registration_participants` DISABLE KEYS */;
INSERT INTO `registration_participants` VALUES (1,1,1,'member','Karim Uddin','01710000004',49,'Male',NULL,'L',NULL,0.00,1200.00,1200.00,6,'2026-10-31 22:34:42'),(2,1,NULL,'guest','Fatema Karim',NULL,42,'Female','Spouse','M','স্মারক',300.00,1000.00,1300.00,NULL,'2026-10-31 22:34:42');
/*!40000 ALTER TABLE `registration_participants` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `role_permissions`
--

DROP TABLE IF EXISTS `role_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_permissions` (
  `role_id` int unsigned NOT NULL,
  `permission_id` int unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`permission_id`),
  KEY `role_permissions_permission_id_foreign` (`permission_id`),
  CONSTRAINT `role_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `role_permissions`
--

LOCK TABLES `role_permissions` WRITE;
/*!40000 ALTER TABLE `role_permissions` DISABLE KEYS */;
INSERT INTO `role_permissions` VALUES (1,1),(2,1),(3,1),(4,1),(1,2),(2,2),(3,2),(4,2),(1,3),(2,3),(3,3),(4,3),(1,4),(2,4),(1,5),(2,5),(3,5),(1,6),(2,6),(1,7),(2,7),(3,7),(1,8),(2,8),(1,9),(2,9),(1,10),(2,10),(1,11),(2,11),(3,11),(4,11),(1,12),(2,12),(3,12),(4,12),(1,13),(2,13),(1,14),(2,14),(1,15),(2,15),(3,15),(4,15),(1,16),(2,16),(3,16),(1,17),(2,17),(3,17),(4,17),(1,18),(2,18),(1,19),(2,19),(3,19),(1,20),(2,20),(3,20),(1,21),(2,21),(3,21),(1,22),(2,22),(3,22),(1,23),(2,23),(3,23),(4,23),(1,24),(2,24),(3,24),(1,25),(2,25),(3,25),(4,25),(1,26),(2,26),(3,26),(1,27),(2,27),(1,28),(2,28),(3,28),(4,28),(1,29),(1,30),(1,31),(2,31),(3,31),(4,31);
/*!40000 ALTER TABLE `role_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `roles`
--

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `slug` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `roles`
--

LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (1,'Administrator','admin','Administrator','2026-10-31 22:34:42','2026-10-31 22:34:42'),(2,'Approver','approver','Approver','2026-10-31 22:34:42','2026-10-31 22:34:42'),(3,'Editor','editor','Editor','2026-10-31 22:34:42','2026-10-31 22:34:42'),(4,'Member user','user','Member user','2026-10-31 22:34:42','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `schools`
--

DROP TABLE IF EXISTS `schools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `schools` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8mb4_general_ci NOT NULL,
  `district_id` int unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `schools_district_id_foreign` (`district_id`),
  KEY `name` (`name`),
  CONSTRAINT `schools_district_id_foreign` FOREIGN KEY (`district_id`) REFERENCES `districts` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `schools`
--

LOCK TABLES `schools` WRITE;
/*!40000 ALTER TABLE `schools` DISABLE KEYS */;
INSERT INTO `schools` VALUES (1,'Rajshahi Collegiate School',51,'2026-10-31 22:34:48'),(2,'Dhaka Collegiate School',18,'2026-10-31 22:34:48'),(3,'Comilla Zilla School',11,'2026-10-31 22:34:48'),(4,'Sylhet Government Pilot High School',64,'2026-10-31 22:34:48'),(5,'Feni Government Pilot High School',13,'2026-10-31 22:34:48'),(6,'Khulna Zilla School',35,'2026-10-31 22:34:48');
/*!40000 ALTER TABLE `schools` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `settings`
--

DROP TABLE IF EXISTS `settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `settings` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `skey` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `svalue` text COLLATE utf8mb4_general_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `skey` (`skey`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `settings`
--

LOCK TABLES `settings` WRITE;
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES (1,'org_name','AMRA93','2026-10-31 22:34:42','2026-10-31 22:34:42'),(2,'org_name_bn','আমরা ৯৩','2026-10-31 22:34:42','2026-10-31 22:34:42'),(3,'org_tagline','সারা বাংলাদেশ এস.এস.সি ৯৩ ব্যাচ','2026-10-31 22:34:42','2026-10-31 22:34:42'),(4,'approval_flow','verifier_then_approver','2026-10-31 22:34:42','2026-10-31 22:34:42'),(5,'member_id_prefix','93','2026-10-31 22:34:42','2026-10-31 22:34:42'),(6,'member_id_width','6','2026-10-31 22:34:42','2026-10-31 22:34:42'),(7,'registration_mode','self_members_guests','2026-10-31 22:34:42','2026-10-31 22:34:42'),(8,'qr_mode','both','2026-10-31 22:34:42','2026-10-31 22:34:42'),(9,'payment_methods','cash,bkash,nagad,manual','2026-10-31 22:34:42','2026-10-31 22:34:42'),(10,'editor_edit_mode','limited','2026-10-31 22:34:42','2026-10-31 22:34:42'),(11,'duplicate_check_mobile','1','2026-10-31 22:34:42','2026-10-31 22:34:42'),(12,'duplicate_check_email','1','2026-10-31 22:34:42','2026-10-31 22:34:42'),(13,'duplicate_check_nid','1','2026-10-31 22:34:42','2026-10-31 22:34:42'),(14,'otp_ttl_seconds','300','2026-10-31 22:34:42','2026-10-31 22:34:42'),(15,'otp_max_attempts','5','2026-10-31 22:34:42','2026-10-31 22:34:42'),(16,'login_max_attempts','5','2026-10-31 22:34:42','2026-10-31 22:34:42'),(17,'login_lock_minutes','15','2026-10-31 22:34:42','2026-10-31 22:34:42'),(18,'photo_max_kb','100','2026-10-31 22:34:42','2026-10-31 22:34:42'),(19,'payment_bkash_number','01700000000','2026-10-31 22:34:42','2026-10-31 22:34:42'),(20,'payment_nagad_number','01800000000','2026-10-31 22:34:42','2026-10-31 22:34:42'),(21,'allow_unpaid_entry','0','2026-10-31 22:34:42','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_roles`
--

DROP TABLE IF EXISTS `user_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_roles` (
  `user_id` int unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `user_roles_role_id_foreign` (`role_id`),
  CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_roles`
--

LOCK TABLES `user_roles` WRITE;
/*!40000 ALTER TABLE `user_roles` DISABLE KEYS */;
INSERT INTO `user_roles` VALUES (1,1),(2,2),(3,3),(4,4),(5,4);
/*!40000 ALTER TABLE `user_roles` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `full_name` varchar(150) COLLATE utf8mb4_general_ci NOT NULL,
  `email` varchar(150) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mobile` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
  `password_hash` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `mobile_verified_at` datetime DEFAULT NULL,
  `failed_logins` int unsigned NOT NULL DEFAULT '0',
  `locked_until` datetime DEFAULT NULL,
  `last_login_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mobile` (`mobile`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'System Admin','admin@amra93.org','01710000001','$2y$10$UaTPo8kgZn6P9kiqi7P6YOGd.ZaP3WG9nA.2MKsmXyc2A8pt6alJi','active','2026-10-31 22:34:42',0,NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(2,'Review Approver','approver@amra93.org','01710000002','$2y$10$UaTPo8kgZn6P9kiqi7P6YOGd.ZaP3WG9nA.2MKsmXyc2A8pt6alJi','active','2026-10-31 22:34:42',0,NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(3,'Gate Editor','editor@amra93.org','01710000003','$2y$10$UaTPo8kgZn6P9kiqi7P6YOGd.ZaP3WG9nA.2MKsmXyc2A8pt6alJi','active','2026-10-31 22:34:42',0,NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(4,'Karim Uddin','karim@amra93.org','01710000004','$2y$10$UaTPo8kgZn6P9kiqi7P6YOGd.ZaP3WG9nA.2MKsmXyc2A8pt6alJi','active','2026-10-31 22:34:42',0,NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL),(5,'Rahim Ahmed','rahim@amra93.org','01710000005','$2y$10$UaTPo8kgZn6P9kiqi7P6YOGd.ZaP3WG9nA.2MKsmXyc2A8pt6alJi','active','2026-10-31 22:34:42',0,NULL,NULL,'2026-10-31 22:34:42','2026-10-31 22:34:42',NULL);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `volunteer_assignments`
--

DROP TABLE IF EXISTS `volunteer_assignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `volunteer_assignments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `volunteer_id` int unsigned NOT NULL,
  `program_id` int unsigned NOT NULL,
  `role_name` varchar(80) COLLATE utf8mb4_general_ci NOT NULL,
  `team_name` varchar(80) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'assigned',
  `assigned_by` int unsigned NOT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `volunteer_assignments_volunteer_id_foreign` (`volunteer_id`),
  KEY `volunteer_assignments_program_id_foreign` (`program_id`),
  CONSTRAINT `volunteer_assignments_program_id_foreign` FOREIGN KEY (`program_id`) REFERENCES `programs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `volunteer_assignments_volunteer_id_foreign` FOREIGN KEY (`volunteer_id`) REFERENCES `volunteers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `volunteer_assignments`
--

LOCK TABLES `volunteer_assignments` WRITE;
/*!40000 ALTER TABLE `volunteer_assignments` DISABLE KEYS */;
INSERT INTO `volunteer_assignments` VALUES (1,1,1,'Reception','Gate A','assigned',3,'2026-10-31 22:34:42');
/*!40000 ALTER TABLE `volunteer_assignments` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `volunteer_attendance`
--

DROP TABLE IF EXISTS `volunteer_attendance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `volunteer_attendance` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `assignment_id` int unsigned NOT NULL,
  `checked_in_at` datetime DEFAULT NULL,
  `checked_in_by` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `assignment_id` (`assignment_id`),
  CONSTRAINT `volunteer_attendance_assignment_id_foreign` FOREIGN KEY (`assignment_id`) REFERENCES `volunteer_assignments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `volunteer_attendance`
--

LOCK TABLES `volunteer_attendance` WRITE;
/*!40000 ALTER TABLE `volunteer_attendance` DISABLE KEYS */;
/*!40000 ALTER TABLE `volunteer_attendance` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `volunteers`
--

DROP TABLE IF EXISTS `volunteers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `volunteers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int unsigned DEFAULT NULL,
  `member_id` int unsigned DEFAULT NULL,
  `phone` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `skills` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'active',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `volunteers`
--

LOCK TABLES `volunteers` WRITE;
/*!40000 ALTER TABLE `volunteers` DISABLE KEYS */;
INSERT INTO `volunteers` VALUES (1,4,1,'01710000004','Reception','active','2026-10-31 22:34:42');
/*!40000 ALTER TABLE `volunteers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping routines for database 'amra93'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-10-31 16:35:14
