-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2026 at 01:54 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `pwdta_db`
--

DELIMITER $$

CREATE PROCEDURE sp_add_enrollment (
    IN p_entity_type VARCHAR(20),
    IN p_entity_id INT,
    IN p_name VARCHAR(255),
    IN p_phone VARCHAR(20),
    IN p_email VARCHAR(255),
    IN p_org VARCHAR(255)
)
BEGIN
    INSERT INTO enrollments (
        entity_type,
        entity_id,
        name,
        phone,
        email,
        organization
    )
    VALUES (
        p_entity_type,
        p_entity_id,
        p_name,
        p_phone,
        p_email,
        p_org
    );
END $$

DELIMITER ;

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

--
-- Table structure for table `admins`
--

CREATE TABLE `admins` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` varchar(50) DEFAULT 'admin',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admins`
--

INSERT INTO `admins` (`id`, `name`, `email`, `password`, `role`, `created_at`) VALUES
(1, 'Super Admin', 'admin@pwdtraining.gov.bd', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'super_admin', '2026-05-09 15:34:02');

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

--
-- Table structure for table `certificates`
--

CREATE TABLE `certificates` (
  `id` int(11) NOT NULL,
  `certificate_no` varchar(100) NOT NULL,
  `trainee_id` int(11) NOT NULL,
  `training_id` int(11) NOT NULL,
  `issue_date` date NOT NULL,
  `status` enum('valid','revoked') DEFAULT 'valid',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `contact_messages`
--

CREATE TABLE `contact_messages` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `message` text NOT NULL,
  `is_read` tinyint(1) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `enrollments`
--

CREATE TABLE `enrollments` (
  `id` int(11) NOT NULL,
  `entity_type` enum('training','testing') NOT NULL,
  `entity_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `organization` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected','completed') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `equipment`
--

CREATE TABLE `equipment` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `capacity` varchar(100) DEFAULT NULL,
  `standard` varchar(100) DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `desc` text DEFAULT NULL,
  `model` varchar(255) DEFAULT NULL,
  `serial` varchar(255) DEFAULT NULL,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `equipment`
--

INSERT INTO `equipment` (`id`, `name`, `capacity`, `standard`, `image_url`, `is_active`, `created_at`, `updated_at`, `desc`, `model`, `serial`, `img`) VALUES
(1, 'Universal Testing Machine (UTM)', '1000 kN', 'IS: 14858', 'https://picsum.photos/seed/utm/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL),
(2, 'Compression Testing Machine', '2000 kN', 'IS: 516', 'https://picsum.photos/seed/ctm/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL),
(3, 'Ultrasonic Pulse Velocity Meter', 'Up to 10m range', 'IS: 13311 Part 1', 'https://picsum.photos/seed/upvm/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL),
(4, 'Rebound Hammer', '10-70 N/mm²', 'IS: 13311 Part 2', 'https://picsum.photos/seed/rh/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL),
(5, 'Sieve Shaker', '200mm dia sieves', 'IS: 460', 'https://picsum.photos/seed/sieve/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL),
(6, 'Los Angeles Abrasion Machine', '5000g sample', 'IS: 2386 Part 4', 'https://picsum.photos/seed/la/400/300.jpg', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `facilities`
--

CREATE TABLE `facilities` (
  `id` int(11) NOT NULL,
  `type` enum('classroom','computerlab','library','residential') NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `status` varchar(50) DEFAULT 'Active',
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `desc` text DEFAULT NULL,
  `capacity` int(11) DEFAULT 0,
  `area` int(11) DEFAULT 0,
  `features` text DEFAULT NULL,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `facilities`
--

INSERT INTO `facilities` (`id`, `type`, `title`, `description`, `image_url`, `status`, `is_active`, `created_at`, `updated_at`, `desc`, `capacity`, `area`, `features`, `img`) VALUES
(2, 'classroom', 'Refresher Training on Public Procurement Rules (PPR)', NULL, NULL, 'Active', 1, '2026-05-19 10:28:14', '2026-05-19 10:31:04', 'vsfdgsggfvvfv', 0, 0, NULL, 'uploads/6a0c3b3ecc6b4_1779186494.png'),
(3, '', '1', NULL, NULL, 'Active', 1, '2026-05-19 10:59:28', '2026-05-19 10:59:28', 'This is Gymnasium', 0, 0, NULL, 'uploads/6a0c429096989_1779188368.jpg');

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

--
-- Table structure for table `gallery`
--

CREATE TABLE `gallery` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `image_url` varchar(500) NOT NULL,
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `date` varchar(50) DEFAULT NULL,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `gallery`
--

INSERT INTO `gallery` (`id`, `title`, `category`, `image_url`, `display_order`, `is_active`, `created_at`, `updated_at`, `date`, `img`) VALUES
(1, 'Training Session - AutoCAD', 'Training', 'https://picsum.photos/seed/gal1/800/600.jpg', 1, 1, '2026-05-09 15:13:16', '2026-05-19 10:52:45', NULL, 'uploads/6a0c40fdeae2b_1779187965.jpg'),
(2, 'Laboratory Testing', 'Event', 'https://picsum.photos/seed/gal2/800/600.jpg', 2, 1, '2026-05-09 15:13:16', '2026-05-19 10:52:38', NULL, 'uploads/6a0c40f6915e2_1779187958.jpg'),
(3, 'Workshop on STAAD Pro', 'Training', 'https://picsum.photos/seed/gal3/800/600.jpg', 3, 1, '2026-05-09 15:13:16', '2026-05-19 10:52:22', NULL, 'uploads/6a0c40e6a03d8_1779187942.jpg'),
(4, 'Annual Ceremony 2025', 'Event', 'https://picsum.photos/seed/gal4/800/600.jpg', 4, 1, '2026-05-09 15:13:16', '2026-05-19 10:51:58', NULL, 'uploads/6a0c40ce4bb0c_1779187918.jpg'),
(5, 'Computer Lab', 'Event', 'https://picsum.photos/seed/gal5/800/600.jpg', 5, 1, '2026-05-09 15:13:16', '2026-05-19 10:51:41', NULL, 'uploads/6a0c40bd87b08_1779187901.jpg'),
(6, 'Library Section', 'Event', 'https://picsum.photos/seed/gal6/800/600.jpg', 6, 1, '2026-05-09 15:13:16', '2026-05-19 10:51:33', NULL, 'uploads/6a0c40b5826b1_1779187893.jpg');

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

--
-- Table structure for table `notices`
--

CREATE TABLE `notices` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `content` text DEFAULT NULL,
  `notice_date` date DEFAULT NULL,
  `type` enum('new','important','general') DEFAULT 'general',
  `category` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `date` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `notices`
--

INSERT INTO `notices` (`id`, `title`, `content`, `notice_date`, `type`, `category`, `is_active`, `created_at`, `updated_at`, `date`) VALUES
(1, 'New Training Schedule Released', 'We are pleased to announce our training schedule for January-March 2026. Registration is now open for all courses.', '2026-01-05', 'important', 'Training', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL),
(2, 'Holiday Notice - Independence Day', 'Academy will remain closed on March 26, 2026 on the occasion of Independence Day.', '2026-03-20', 'new', 'Holiday', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL),
(3, 'Laboratory Maintenance Notice', 'Testing laboratory will be under maintenance from Feb 15-20, 2026. Please plan accordingly.', '2026-02-10', 'general', 'Laboratory', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL),
(4, 'Certificate Distribution Ceremony', 'Certificate distribution ceremony for completed courses will be held on January 30, 2026.', '2026-01-25', 'important', 'Event', 1, '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL);

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

--
-- Table structure for table `officers`
--

CREATE TABLE `officers` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `department` varchar(255) DEFAULT NULL,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `officers`
--

INSERT INTO `officers` (`id`, `name`, `designation`, `phone`, `email`, `image_url`, `display_order`, `is_active`, `created_at`, `updated_at`, `department`, `img`) VALUES
(1, 'Engr. Md. Abdul Karim', 'Librarian', '+880-2-8181234', 'ce.training@pwd.gov.bd', 'https://picsum.photos/seed/officer1/200/200.jpg', 1, 1, '2026-05-09 15:13:16', '2026-05-19 11:25:21', NULL, 'uploads/6a0c48a196016_1779189921.jpeg'),
(2, 'Engr. Fatema Begum', 'Accountant', '+880-2-8181235', 'se.training@pwd.gov.bd', 'https://picsum.photos/seed/officer2/200/200.jpg', 2, 1, '2026-05-09 15:13:16', '2026-05-19 11:25:16', NULL, 'uploads/6a0c489c0d0de_1779189916.jpeg'),
(3, 'Engr. Rafiqul Islam', 'Lab Attendant', '+880-2-8181236', 'ee.training@pwd.gov.bd', 'https://picsum.photos/seed/officer3/200/200.jpg', 3, 1, '2026-05-09 15:13:16', '2026-05-19 11:25:10', NULL, 'uploads/6a0c4896249bf_1779189910.jpeg'),
(4, 'Engr. Nasreen Akhter', 'Computer Lab Incharge', '+880-2-8181237', 'ae.training@pwd.gov.bd', 'https://picsum.photos/seed/officer4/200/200.jpg', 4, 1, '2026-05-09 15:13:16', '2026-05-19 11:25:02', NULL, 'uploads/6a0c488e24837_1779189902.jpeg');

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

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

CREATE TABLE `settings` (
  `id` int(11) NOT NULL DEFAULT 1,
  `site_name` varchar(255) DEFAULT 'PWD Training Academy',
  `phone` varchar(50) DEFAULT '',
  `email` varchar(255) DEFAULT '',
  `address` text DEFAULT NULL,
  `facebook` varchar(255) DEFAULT '',
  `youtube` varchar(255) DEFAULT '',
  `logo` varchar(255) DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `settings` (`id`, `site_name`, `phone`, `email`, `address`, `facebook`, `youtube`, `logo`) VALUES
(1, 'PWD Training Academy', '+880-2-818123444', 'info@pwdtraining.gov.bd', 'PWD, Sher-e-Bangla Nagar, Dhaka-1207', '', '', '');

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

--
-- Table structure for table `site_settings`
--

CREATE TABLE `site_settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `site_settings`
--

INSERT INTO `site_settings` (`id`, `setting_key`, `setting_value`, `updated_at`) VALUES
(1, 'academy_name', 'PWD Training Academy', '2026-05-09 15:13:16'),
(2, 'phone', '+880-2-8181234', '2026-05-09 15:13:16'),
(3, 'email', 'info@pwdtraining.gov.bd', '2026-05-09 15:13:16'),
(4, 'address', 'PWD, Sher-e-Bangla Nagar, Dhaka-1207', '2026-05-09 15:13:16'),
(5, 'facebook_url', 'https://facebook.com/pwdtraining', '2026-05-09 15:13:16'),
(6, 'youtube_url', 'https://youtube.com/pwdtraining', '2026-05-09 15:13:16');

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

--
-- Table structure for table `sliders`
--

CREATE TABLE `sliders` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `subtitle` varchar(500) DEFAULT NULL,
  `button_text` varchar(100) DEFAULT NULL,
  `button_link` varchar(255) DEFAULT NULL,
  `image_url` varchar(500) NOT NULL,
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `btnText` varchar(255) DEFAULT NULL,
  `btnLink` varchar(255) DEFAULT NULL,
  `order` int(11) DEFAULT 0,
  `active` tinyint(4) DEFAULT 1,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sliders`
--

INSERT INTO `sliders` (`id`, `title`, `subtitle`, `button_text`, `button_link`, `image_url`, `display_order`, `is_active`, `created_at`, `updated_at`, `btnText`, `btnLink`, `order`, `active`, `img`) VALUES
(1, 'Welcome to PWD Training Academy', 'Building Capacity for Nation\'s Infrastructure', 'Explore Programs', 'trainings', 'uploads/img_6a001a9d594a50.50319960.jpg', 1, 1, '2026-05-09 15:13:16', '2026-05-19 10:50:46', NULL, NULL, 0, 1, 'uploads/6a0c4086c8d3c_1779187846.jpg'),
(6, 'Building Skills for a Better Infrastructure', 'Providing world-class technical and professional training for engineers, officers, and staff', '', '', 'uploads/img_6a001a5c506a93.71480847.jpg', 0, 1, '2026-05-10 05:15:12', '2026-05-19 10:49:59', NULL, NULL, 0, 1, 'uploads/6a0c40574c2ec_1779187799.jpg'),
(9, 'Training Tomorrow’s Public Infrastructure Leaders', 'Providing world-class technical and professional training for engineers, officers, and staff', 'Start Learning', '', 'uploads/img_6a001abec87086.08676794.jpg', 0, 1, '2026-05-10 05:42:22', '2026-05-19 10:49:41', NULL, NULL, 0, 1, 'uploads/6a0c40459439b_1779187781.jpg'),
(10, 'Innovation, Training, Excellence', 'Developing skilled manpower for sustainable national infrastructure.', 'Join Training', '', 'uploads/img_6a001af559a1a0.33032844.jpg', 0, 1, '2026-05-10 05:43:17', '2026-05-19 10:48:40', NULL, NULL, 0, 1, 'uploads/6a0c40084c2cf_1779187720.jpg');

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

--
-- Table structure for table `testings`
--

CREATE TABLE `testings` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `test_type` enum('Destructive','Non-Destructive') DEFAULT 'Destructive',
  `turnaround` varchar(100) DEFAULT NULL,
  `fee` decimal(10,2) DEFAULT 0.00,
  `image_url` varchar(500) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `desc` text DEFAULT NULL,
  `testType` varchar(100) DEFAULT NULL,
  `standard` varchar(50) DEFAULT 'BDS',
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `testings`
--

INSERT INTO `testings` (`id`, `title`, `description`, `test_type`, `turnaround`, `fee`, `image_url`, `created_at`, `updated_at`, `desc`, `testType`, `standard`, `img`) VALUES
(1, 'Compressive Strength Test (Cube)', 'Determination of compressive strength of concrete cubes as per BDS/IS standards.', 'Destructive', '7-28 days', 500.00, 'https://picsum.photos/seed/cube/600/400.jpg', '2026-05-09 15:13:15', '2026-05-09 15:13:15', NULL, NULL, 'BDS', NULL),
(2, 'Tensile Strength Test (Steel)', 'Tensile test for reinforcement steel bars to determine yield and ultimate strength.', 'Destructive', '3-5 days', 300.00, 'https://picsum.photos/seed/steel/600/400.jpg', '2026-05-09 15:13:15', '2026-05-09 15:13:15', NULL, NULL, 'BDS', NULL),
(3, 'Ultrasonic Pulse Velocity Test', 'Non-destructive testing for assessing concrete quality and uniformity.', 'Non-Destructive', '1-2 days', 1000.00, 'https://picsum.photos/seed/upv/600/400.jpg', '2026-05-09 15:13:15', '2026-05-09 15:13:15', NULL, NULL, 'BDS', NULL),
(4, 'Rebound Hammer Test', 'Surface hardness test for quick assessment of concrete quality.', 'Non-Destructive', 'Same day', 500.00, 'https://picsum.photos/seed/hammer/600/400.jpg', '2026-05-09 15:13:15', '2026-05-09 15:13:15', NULL, NULL, 'BDS', NULL),
(5, 'Sieve Analysiss', '', '', '3', 200.00, 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWoAAABXCAYAAAAtSw8kAABa1ElEQVR42u29d5hcx3Hu/euTZmZzBBYbgEXOOZMgCYI5KJAiAEmkqEBKsleWbdm+vo73sT/b19fpWrKuYSVKlEiKBAjmnEAwgMg5EDksFlhswOYwc1J/f3QP9mC5IACSICl56nnmAXbmhO4+fd6qfqu6SvAplEcfbbJMUwz3fXldZ6f8bG+vnCklCcvmeE62eDsry3g0DOWGxYtL28hIRjKSkd9yEZ+2Bq1Y0ZQwTW5tb5e/s29/MGf3Hj+n/lSI70NermBYtcnkidbR6mHG47bNL32f3UuWlAaZR5mRjGQkA9SXWB57rCkRhkzs6ZHf2LvP/9yad/zyI0dDenslUvYdZ5pQXGQwfZqZmjnDereszPhZVpbxmO/LpsWLM4CdkYxkJAPUFy3LlzeddZ+lS0tl5DdDCLJsm5HJFLfW1QV3bt', '2026-05-09 15:13:15', '2026-05-19 10:01:07', NULL, NULL, 'BDS', NULL);

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

--
-- Table structure for table `trainees`
--

CREATE TABLE `trainees` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `organization` varchar(255) DEFAULT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive','graduated') DEFAULT 'active',
  `enrollment_date` date DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `org` varchar(255) DEFAULT NULL,
  `training` varchar(255) DEFAULT NULL,
  `date` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `trainees`
--

INSERT INTO `trainees` (`id`, `user_id`, `name`, `email`, `phone`, `organization`, `designation`, `status`, `enrollment_date`, `created_at`, `updated_at`, `org`, `training`, `date`) VALUES
(1, NULL, 'Engr. Rahim Uddin', 'rahim@example.com', '+8801712345678', 'PWD Dhaka', 'Sub-Assistant Engineer', 'active', '2026-01-10', '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL),
(2, NULL, 'Engr. Karim Hossain', 'karim@example.com', '+8801798765432', 'PWD Chittagong', 'Assistant Engineer', 'active', '2026-01-12', '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL),
(3, NULL, 'Engr. Salma Akter', 'salma@example.com', '+8801654321098', 'PWD Rajshahi', 'Executive Engineer', 'graduated', '2025-11-05', '2026-05-09 15:13:16', '2026-05-09 15:13:16', NULL, NULL, NULL);

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

--
-- Table structure for table `trainings`
--

CREATE TABLE `trainings` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `category` enum('Short Course','Workshop','Seminar','Long Course') DEFAULT 'Short Course',
  `status` enum('upcoming','ongoing','completed') DEFAULT 'upcoming',
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `fee` decimal(10,2) DEFAULT 0.00,
  `duration` varchar(100) DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `desc` text DEFAULT NULL,
  `capacity` int(11) DEFAULT 30,
  `venue` varchar(255) DEFAULT NULL,
  `img` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `trainings`
--

INSERT INTO `trainings` (`id`, `title`, `description`, `category`, `status`, `start_date`, `end_date`, `fee`, `duration`, `image_url`, `created_at`, `updated_at`, `desc`, `capacity`, `venue`, `img`) VALUES
(69, 'Geotechnical Investigation and Construction Practices of Foundation for Buildings', 'Training on geotechnical investigation and foundation construction practices for buildings.', 'Short Course', 'upcoming', '2026-01-10', '2026-01-20', 4500.00, '10 Days', 'https://picsum.photos/seed/geotech/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'This training focuses on soil investigation, foundation analysis, site testing methods, and safe foundation construction practices for modern buildings.', 40, 'PWD Training Academy, Dhaka', 'https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=1200&auto=format&fit=crop'),
(70, 'Retrofit Construction and Supervision', 'Training on retrofit construction techniques and supervision methods.', 'Short Course', 'completed', '2026-02-05', '2026-02-15', 4000.00, '10 Days', 'https://picsum.photos/seed/retrofit/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Participants will learn retrofit techniques, structural strengthening methods, repair supervision, and renovation management of existing buildings.', 35, 'Engineering Staff College, Dhaka', 'https://images.unsplash.com/photo-1517048676732-d65bc937f952?q=80&w=1200&auto=format&fit=crop'),
(71, 'Pile Construction, Pile Driving and Load Test of Pile', 'Comprehensive course on pile construction, pile driving, and load testing.', 'Workshop', 'ongoing', '2026-03-01', '2026-03-12', 6500.00, '12 Days', 'https://picsum.photos/seed/pile/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Practical training on pile construction, pile driving systems, foundation safety, and pile load testing procedures.', 45, 'PWDTA Foundation Lab', 'https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1200&auto=format&fit=crop'),
(72, 'Plumbing Technology and Rainwater Harvesting System', 'Training on plumbing technology and rainwater harvesting systems.', 'Workshop', 'upcoming', '2026-03-15', '2026-03-22', 3500.00, '7 Days', 'https://picsum.photos/seed/plumbing/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Hands-on training covering plumbing systems, pipe fittings, water supply management, and rainwater harvesting solutions.', 30, 'PWD Plumbing Workshop Center', 'https://images.unsplash.com/photo-1585704032915-c3400ca199e7?q=80&w=1200&auto=format&fit=crop'),
(73, 'Land Management', 'Training on land management systems and practices.', 'Seminar', 'completed', '2026-04-02', '2026-04-05', 2500.00, '3 Days', 'https://picsum.photos/seed/land/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Learn modern land management systems, land records, acquisition procedures, and digital land administration methods.', 50, 'Land Management Institute, Dhaka', 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=1200&auto=format&fit=crop'),
(74, 'Generator, Lift and Substation Installation, Operation & Maintenance', 'Training on installation, operation, and maintenance of generators, lifts, and substations.', 'Long Course', 'upcoming', '2026-04-10', '2026-05-05', 12000.00, '25 Days', 'https://picsum.photos/seed/generator/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Comprehensive course on generator systems, lift installation, electrical substations, and maintenance operations.', 32, 'E/M Training Complex, Dhaka', 'https://images.unsplash.com/photo-1494412519320-aa613dfb7738?q=80&w=1200&auto=format&fit=crop'),
(75, 'Civil Suit Management & Civil Law Procedures', 'Course on civil suit management and civil law procedures.', 'Seminar', 'ongoing', '2026-05-01', '2026-05-06', 3000.00, '5 Days', 'https://picsum.photos/seed/civillaw/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on civil litigation procedures, case management systems, documentation, and legal compliance processes.', 28, 'PWD Conference Hall', 'https://images.unsplash.com/photo-1521791136064-7986c2920216?q=80&w=1200&auto=format&fit=crop'),
(76, 'Judicial Procedure and Development Management', 'Training on judicial procedures and development management.', 'Seminar', 'upcoming', '2026-05-15', '2026-05-20', 3200.00, '5 Days', 'https://picsum.photos/seed/judicial/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Participants will gain knowledge about judicial procedures, project governance, and public sector development management.', 36, 'Judicial Administration Center', 'https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?q=80&w=1200&auto=format&fit=crop'),
(77, 'Cost Estimation of Construction Project using Estimating Software of PWD', 'Training on project cost estimation using PWD estimating software.', 'Workshop', 'upcoming', '2026-06-01', '2026-06-10', 7000.00, '10 Days', 'https://picsum.photos/seed/cost/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Learn construction cost estimation techniques using official PWD estimating software with real project examples.', 40, 'Computer Lab - PWDTA', 'https://images.unsplash.com/photo-1554224155-6726b3ff858f?q=80&w=1200&auto=format&fit=crop'),
(78, 'Construction Project Monitoring using Project Monitoring Software of PWD', 'Training on construction project monitoring using PWD software.', 'Workshop', 'completed', '2026-06-15', '2026-06-22', 6800.00, '7 Days', 'https://picsum.photos/seed/monitoring/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on monitoring construction progress, reporting systems, and project tracking using PWD monitoring software.', 38, 'Monitoring & ICT Lab', 'https://images.unsplash.com/photo-1497366754035-f200968a6e72?q=80&w=1200&auto=format&fit=crop'),
(79, 'Basics of Internal Electric Wiring of Buildings', 'Basic training on internal electrical wiring systems for buildings.', 'Short Course', 'upcoming', '2026-07-01', '2026-07-08', 3500.00, '7 Days', 'https://picsum.photos/seed/wiring/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Basic practical course on electrical wiring systems, safety measures, and internal building electrification.', 30, 'Electrical Workshop Unit', 'https://images.unsplash.com/photo-1621905252507-b35492cc74b4?q=80&w=1200&auto=format&fit=crop'),
(80, 'Fire Safety Assessment, Fire Fighting and Detection System For Building', 'Training on fire safety assessment, fire fighting, and detection systems.', 'Workshop', 'ongoing', '2026-07-10', '2026-07-18', 5000.00, '8 Days', 'https://picsum.photos/seed/fire/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Specialized training on fire safety inspection, firefighting systems, smoke detection, and emergency response planning.', 42, 'Fire Safety Training Center', 'https://images.unsplash.com/photo-1517048676732-d65bc937f952?q=80&w=1200&auto=format&fit=crop'),
(81, 'Lightning Protection, Renewable Energy, CCTV Camera and other E/M Equipment', 'Training on lightning protection, renewable energy systems, CCTV, and E/M equipment.', 'Workshop', 'upcoming', '2026-08-01', '2026-08-10', 6000.00, '10 Days', 'https://picsum.photos/seed/cctv/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Course on lightning protection systems, solar power solutions, CCTV installation, and E/M equipment maintenance.', 35, 'Renewable Energy Lab', 'https://images.unsplash.com/photo-1509395176047-4a66953fd231?q=80&w=1200&auto=format&fit=crop'),
(82, 'Understanding HVAC System, Operation & Maintenance', 'Training on HVAC systems, operation, and maintenance.', 'Long Course', 'upcoming', '2026-08-15', '2026-09-05', 15000.00, '20 Days', 'https://picsum.photos/seed/hvac/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Detailed understanding of HVAC systems, air conditioning operations, ventilation systems, and maintenance procedures.', 30, 'HVAC Simulation Lab', 'https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?q=80&w=1200&auto=format&fit=crop'),
(83, 'Green Buildings: Concepts and Ratings Procedure', 'Course on green building concepts and rating procedures.', 'Seminar', 'completed', '2026-09-10', '2026-09-13', 2800.00, '3 Days', 'https://picsum.photos/seed/green/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Seminar on sustainable green building concepts, environmental ratings, energy efficiency, and eco-friendly designs.', 60, 'Green Building Resource Center', 'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1200&auto=format&fit=crop'),
(84, 'Public Procurement Rules (PPR) - 2008 with Latest Changes', 'Training on Public Procurement Rules (PPR) with latest updates.', 'Seminar', 'ongoing', '2026-09-20', '2026-09-25', 4500.00, '5 Days', 'https://picsum.photos/seed/ppr/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training covering latest Public Procurement Rules (PPR), tender procedures, procurement ethics, and compliance.', 55, 'PWD Procurement Hall', 'https://images.unsplash.com/photo-1450101499163-c8848c66ca85?q=80&w=1200&auto=format&fit=crop'),
(85, 'Electronic Government Procurement (e-GP)', 'Training on electronic government procurement systems.', 'Workshop', 'upcoming', '2026-10-01', '2026-10-07', 5000.00, '6 Days', 'https://picsum.photos/seed/egp/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Hands-on workshop on e-GP system operation, tender submission, evaluation process, and procurement management.', 45, 'ICT Procurement Lab', 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1200&auto=format&fit=crop'),
(86, 'AutoCAD-2D', 'Training on AutoCAD 2D drafting and design.', 'Short Course', 'ongoing', '2026-10-10', '2026-10-20', 5500.00, '10 Days', 'https://picsum.photos/seed/autocad2d/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Practical AutoCAD 2D drafting course for engineering drawings, floor plans, and technical design documentation.', 40, 'CAD Lab - PWDTA', 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?q=80&w=1200&auto=format&fit=crop'),
(87, 'Training on National Integrity Strategy (NIS)', 'Training on National Integrity Strategy (NIS).', 'Seminar', 'upcoming', '2026-11-01', '2026-11-03', 2000.00, '2 Days', 'https://picsum.photos/seed/nis/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Awareness training on National Integrity Strategy, ethical governance, transparency, and accountability practices.', 70, 'PWD Seminar Hall', 'https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=1200&auto=format&fit=crop'),
(88, 'Training on Right to Information (RTI)', 'Training on Right to Information (RTI) practices.', 'Seminar', 'completed', '2026-11-05', '2026-11-07', 2200.00, '2 Days', 'https://picsum.photos/seed/rti/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on Right to Information Act, citizen rights, public service transparency, and information disclosure systems.', 55, 'Information Resource Center', 'https://images.unsplash.com/photo-1516321165247-4aa89a48be28?q=80&w=1200&auto=format&fit=crop'),
(89, 'Training on Grievance Redress System (GRS)', 'Training on grievance redress system procedures.', 'Seminar', 'upcoming', '2026-11-10', '2026-11-12', 1800.00, '2 Days', 'https://picsum.photos/seed/grs/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Course on grievance redress procedures, complaint management systems, and citizen service improvement.', 50, 'GRS Training Room', 'https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=1200&auto=format&fit=crop'),
(90, 'Training on Service Delivery Commitment', 'Course on service delivery commitment and implementation.', 'Seminar', 'upcoming', '2026-11-15', '2026-11-17', 1800.00, '2 Days', 'https://picsum.photos/seed/service/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on public service commitment, service standards, customer satisfaction, and performance improvement.', 50, 'Service Excellence Center', 'https://images.unsplash.com/photo-1521737604893-d14cc237f11d?q=80&w=1200&auto=format&fit=crop'),
(91, 'Project Management, Financial Management, MTBF, SDG, Five Yearly Plan & APA', 'Training on project and financial management along with MTBF, SDG, APA.', 'Long Course', 'upcoming', '2026-12-01', '2026-12-20', 14000.00, '20 Days', 'https://picsum.photos/seed/project/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Advanced management course covering project management, MTBF, SDG implementation, APA, and financial planning.', 35, 'Project Management Institute', 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?q=80&w=1200&auto=format&fit=crop'),
(92, 'Construction Project Site Management, Specification of Works and Construction Practices in Superstructures', 'Training on site management and construction practices in superstructures.', 'Long Course', 'ongoing', '2026-12-05', '2026-12-28', 13500.00, '23 Days', 'https://picsum.photos/seed/site/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Comprehensive training on construction site supervision, specifications, safety, and superstructure practices.', 40, 'Construction Site Management Center', 'https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=1200&auto=format&fit=crop'),
(93, 'Orientation Course for Assistant Engineers (Civil & E/M)', 'Orientation course for assistant engineers in Civil and E/M.', 'Short Course', 'upcoming', '2027-01-05', '2027-01-12', 4000.00, '7 Days', 'https://picsum.photos/seed/orientation/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Orientation program for newly appointed assistant engineers covering technical, administrative, and field activities.', 45, 'PWD Orientation Hall', 'https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=1200&auto=format&fit=crop'),
(94, 'Quality Control and Assurance in Building Construction Project', 'Training on quality control and assurance in construction projects.', 'Workshop', 'upcoming', '2027-01-15', '2027-01-22', 5500.00, '7 Days', 'https://picsum.photos/seed/quality/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on quality assurance systems, construction material testing, and project quality control standards.', 38, 'Quality Assurance Laboratory', 'https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=1200&auto=format&fit=crop'),
(95, 'Detail Estimate Preparation Course for SAES', 'Training on detailed estimate preparation for SAES.', 'Workshop', 'completed', '2027-02-01', '2027-02-08', 6000.00, '7 Days', 'https://picsum.photos/seed/estimate/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Workshop on preparation of detailed engineering estimates, BOQ creation, and cost calculation methods.', 34, 'Estimation & Costing Lab', 'https://images.unsplash.com/photo-1554224154-26032ffc0d07?q=80&w=1200&auto=format&fit=crop'),
(96, 'Project Planning and Management Using MS Project', 'Training on project planning and management using MS Project.', 'Workshop', 'upcoming', '2027-02-10', '2027-02-18', 6500.00, '8 Days', 'https://picsum.photos/seed/msproject/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Hands-on training using MS Project for project scheduling, resource management, and progress tracking.', 40, 'Project Software Lab', 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1200&auto=format&fit=crop'),
(97, 'Refresher Training on Construction Practices and Quality Control', 'Refresher course on construction practices and quality control.', 'Workshop', 'ongoing', '2027-03-01', '2027-03-07', 4500.00, '6 Days', 'https://picsum.photos/seed/refresher/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Refresher training on updated construction methods, site supervision, and quality assurance practices.', 36, 'Construction Refresher Center', 'https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=1200&auto=format&fit=crop'),
(98, 'Refresher Course on Electronic Government Procurement (e-GP)', 'Refresher course on electronic government procurement.', 'Workshop', 'upcoming', '2027-03-10', '2027-03-15', 4200.00, '5 Days', 'https://picsum.photos/seed/refegp/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Refresher course on e-GP operations, tender workflow updates, and procurement system best practices.', 42, 'e-GP Computer Lab', 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1200&auto=format&fit=crop'),
(99, 'Training on Financial Management', 'Training on financial management practices.', 'Seminar', 'completed', '2027-03-20', '2027-03-24', 3000.00, '4 Days', 'https://picsum.photos/seed/finance/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on budgeting, accounting systems, audit preparation, and financial reporting in government projects.', 48, 'Finance Management Hall', 'https://images.unsplash.com/photo-1554224155-6726b3ff858f?q=80&w=1200&auto=format&fit=crop'),
(100, 'Audit Procedure: Objection and Disposal', 'Training on audit procedures, objection handling, and disposal.', 'Seminar', 'upcoming', '2027-04-01', '2027-04-05', 2800.00, '4 Days', 'https://picsum.photos/seed/audit/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Course covering audit objection handling, disposal methods, and government audit procedures.', 45, 'Audit & Compliance Center', 'https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?q=80&w=1200&auto=format&fit=crop'),
(101, 'Office Management', 'Training on office management and administration.', 'Short Course', 'upcoming', '2027-04-10', '2027-04-15', 2500.00, '5 Days', 'https://picsum.photos/seed/office/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Office administration training including communication, file management, documentation, and workplace efficiency.', 50, 'Administrative Training Room', 'https://images.unsplash.com/photo-1497366754035-f200968a6e72?q=80&w=1200&auto=format&fit=crop'),
(102, 'Computer Training on Operating System, MS Office, Internet Browsing, e-Mail etc.', 'Basic computer training including OS, MS Office, internet, and email.', 'Short Course', 'ongoing', '2027-04-20', '2027-04-30', 3500.00, '10 Days', 'https://picsum.photos/seed/computer/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Basic computer literacy course covering operating systems, MS Office, internet browsing, and email communication.', 60, 'Computer Training Lab', 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1200&auto=format&fit=crop'),
(103, 'Occupational Health and Safety in Building Construction Project', 'Training on occupational health and safety in construction projects.', 'Workshop', 'upcoming', '2027-05-05', '2027-05-12', 4800.00, '7 Days', 'https://picsum.photos/seed/safety/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on occupational health, construction safety practices, PPE usage, and accident prevention systems.', 38, 'Health & Safety Center', 'https://images.unsplash.com/photo-1581092921461-eab62e97a780?q=80&w=1200&auto=format&fit=crop'),
(104, 'Dynamic Analysis of Structures', 'Advanced training on dynamic structural analysis.', 'Long Course', 'upcoming', '2027-05-15', '2027-06-05', 16000.00, '20 Days', 'https://picsum.photos/seed/dynamic/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Advanced engineering course on dynamic structural behavior, earthquake analysis, and vibration systems.', 28, 'Structural Engineering Lab', 'https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1200&auto=format&fit=crop'),
(105, 'Design of Steel Structures: Theory and Modeling Using Software', 'Training on steel structure design and software modeling.', 'Long Course', 'ongoing', '2027-06-10', '2027-06-30', 17000.00, '20 Days', 'https://picsum.photos/seed/steel/600/400', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Training on steel structure design principles, analysis methods, and software-based modeling techniques.', 30, 'Steel Design Research Lab', 'https://images.unsplash.com/photo-1517048676732-d65bc937f952?q=80&w=1200&auto=format&fit=crop'),
(106, 'Deep Excavation and Top Down Construction Method', '', 'Workshop', 'upcoming', '2027-07-05', '2027-07-12', 7200.00, '7 Days', '', '2026-05-19 06:37:50', '2026-05-19 11:35:56', 'Specialized workshop on deep excavation systems, retaining structures, and top-down construction methodology.', 32, 'Advanced Construction Training Ground', 'https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=1200&auto=format&fit=crop');

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `organization` varchar(255) DEFAULT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `role` enum('user','admin') DEFAULT 'user',
  `status` enum('active','inactive') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `users` (`id`, `name`, `email`, `password`, `phone`, `organization`, `designation`, `role`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Super Admin', 'admin@pwdtraining.gov.bd', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, NULL, NULL, 'admin', 'active', '2026-05-09 15:13:15', '2026-05-09 15:13:15'),
(2, 'Admin', 'admin@pwd.gov.bd', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, NULL, NULL, 'admin', 'active', '2026-05-19 09:56:25', '2026-05-19 09:56:25');

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

--
-- Table structure for table `videos`
--

CREATE TABLE `videos` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `url` varchar(500) NOT NULL,
  `thumbnail_url` varchar(500) DEFAULT NULL,
  `display_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `desc` text DEFAULT NULL,
  `thumb` varchar(500) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `duration` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `videos`
--

INSERT INTO `videos` (`id`, `title`, `url`, `thumbnail_url`, `display_order`, `is_active`, `created_at`, `updated_at`, `desc`, `thumb`, `category`, `duration`) VALUES
(1, 'Academy Introduction Tour', 'https://www.youtube.com/watch?v=hOCA-HTLIUA', 'https://picsum.photos/seed/vid1/400/250.jpg', 1, 1, '2026-05-09 15:13:16', '2026-05-19 11:31:29', 'This is demo', 'https://www.youtube.com/watch?v=hOCA-HTLIUA', 'Training', 2),
(2, 'AutoCAD Training Highlights', 'https://www.youtube.com/watch?v=nZ2h5r6h_ro', 'https://picsum.photos/seed/vid2/400/250.jpg', 2, 1, '2026-05-09 15:13:16', '2026-05-19 10:57:10', NULL, 'https://www.youtube.com/watch?v=nZ2h5r6h_ro', 'Training', 0),
(3, 'Concrete Testing Demonstration', 'https://www.youtube.com/watch?v=wE6LDAOOqqA', 'https://picsum.photos/seed/vid3/400/250.jpg', 3, 1, '2026-05-09 15:13:16', '2026-05-19 10:55:08', NULL, 'https://www.youtube.com/watch?v=wE6LDAOOqqA', 'Training', 0);

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

--
-- Stand-in structure for view `v_stats`
-- (See below for the actual view)
--
CREATE TABLE `v_stats` (
`trainings` bigint(21)
,`testings` bigint(21)
,`notices` bigint(21)
,`trainees` bigint(21)
,`users` bigint(21)
,`gallery` bigint(21)
,`videos` bigint(21)
,`equipment``equipment` bigint(21)
);

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

--
-- Structure for view `v_stats`
--
DROP TABLE IF EXISTS `v_stats`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_stats`  AS SELECT (select count(0) from `trainings`) AS `trainings`, (select count(0) from `testings`) AS `testings`, (select count(0) from `notices` where `notices`.`is_active` = 1) AS `notices`, (select count(0) from `trainees` where `trainees`.`status` = 'active') AS `trainees`, (select count(0) from `users` where `users`.`role` = 'user') AS `users`, (select count(0) from `gallery` where `gallery`.`is_active` = 1) AS `gallery`, (select count(0) from `videos` where `videos`.`is_active` = 1) AS `videos`, (select count(0) from `equipment` where `equipment`.`is_active` = 1) AS `equipment``equipment` ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indexes for table `certificates`
--
ALTER TABLE `certificates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `certificate_no` (`certificate_no`),
  ADD KEY `training_id` (`training_id`),
  ADD KEY `idx_cert_no` (`certificate_no`),
  ADD KEY `idx_trainee` (`trainee_id`);

--
-- Indexes for table `contact_messages`
--
ALTER TABLE `contact_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_read` (`is_read`),
  ADD KEY `idx_date` (`created_at`);

--
-- Indexes for table `enrollments`
--
ALTER TABLE `enrollments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_entity` (`entity_type`,`entity_id`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `equipment`
--
ALTER TABLE `equipment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `facilities`
--
ALTER TABLE `facilities`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_type` (`type`);

--
-- Indexes for table `gallery`
--
ALTER TABLE `gallery`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_category` (`category`),
  ADD KEY `idx_order` (`display_order`);

--
-- Indexes for table `notices`
--
ALTER TABLE `notices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_type` (`type`),
  ADD KEY `idx_date` (`notice_date`),
  ADD KEY `idx_active` (`is_active`);

--
-- Indexes for table `officers`
--
ALTER TABLE `officers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_order` (`display_order`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_settings`
--
ALTER TABLE `site_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `setting_key` (`setting_key`);

--
-- Indexes for table `sliders`
--
ALTER TABLE `sliders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_order` (`display_order`),
  ADD KEY `idx_active` (`is_active`);

--
-- Indexes for table `testings`
--
ALTER TABLE `testings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_test_type` (`test_type`);

--
-- Indexes for table `trainees`
--
ALTER TABLE `trainees`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `idx_email` (`email`),
  ADD KEY `idx_org` (`organization`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `trainings`
--
ALTER TABLE `trainings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_category` (`category`),
  ADD KEY `idx_dates` (`start_date`,`end_date`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `idx_email` (`email`),
  ADD KEY `idx_role` (`role`);

--
-- Indexes for table `videos`
--
ALTER TABLE `videos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_order` (`display_order`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `certificates`
--
ALTER TABLE `certificates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contact_messages`
--
ALTER TABLE `contact_messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enrollments`
--
ALTER TABLE `enrollments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment`
--
ALTER TABLE `equipment`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `facilities`
--
ALTER TABLE `facilities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `gallery`
--
ALTER TABLE `gallery`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `notices`
--
ALTER TABLE `notices`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `officers`
--
ALTER TABLE `officers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `site_settings`
--
ALTER TABLE `site_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `testings`
--
ALTER TABLE `testings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `trainees`
--
ALTER TABLE `trainees`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `trainings`
--
ALTER TABLE `trainings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=108;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `videos`
--
ALTER TABLE `videos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `certificates`
--
ALTER TABLE `certificates`
  ADD CONSTRAINT `certificates_ibfk_1` FOREIGN KEY (`trainee_id`) REFERENCES `trainees` (`id`),
  ADD CONSTRAINT `certificates_ibfk_2` FOREIGN KEY (`training_id`) REFERENCES `trainings` (`id`);

--
-- Constraints for table `trainees`
--
ALTER TABLE `trainees`
  ADD CONSTRAINT `trainees_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET 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 */;
