-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 14, 2026 at 08:06 AM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 8.2.0

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

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

--
-- Table structure for table `apartments`
--

CREATE TABLE `apartments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `total_units` int(11) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `apartments`
--

INSERT INTO `apartments` (`id`, `name`, `location`, `address`, `description`, `total_units`, `contact_person`, `contact_phone`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Sunshine Apartments', '123 Main Street, Downtown', NULL, NULL, NULL, NULL, NULL, 'active', '2026-02-11 02:21:27', '2026-02-11 02:21:27'),
(2, 'Green Valley Residences', '456 Oak Avenue, Suburb', NULL, NULL, NULL, NULL, NULL, 'inactive', '2026-02-11 02:21:27', '2026-02-11 04:46:58'),
(3, 'Riverside Complex', '789 River Road, Waterfront', NULL, NULL, NULL, NULL, NULL, 'inactive', '2026-02-11 02:21:27', '2026-02-11 02:21:27'),
(4, 'raju', 'anna street', 'kfc sholngalluru', NULL, NULL, NULL, NULL, 'active', '2026-02-11 02:23:13', '2026-02-11 02:23:13'),
(5, 'Green View Apartments', 'Downtown', '123 Main St', NULL, NULL, NULL, NULL, 'active', '2026-02-11 04:30:49', '2026-02-11 04:30:49'),
(6, 'Sunset Heights', 'Uptown', '456 Oak Ave', NULL, NULL, NULL, NULL, 'active', '2026-02-11 04:30:49', '2026-02-11 04:30:49'),
(7, 'Sunshine Apartments', 'Downtown', '123 Main Street, Downtown', NULL, NULL, NULL, NULL, 'active', '2026-02-11 23:50:38', '2026-02-11 23:50:38'),
(8, 'Green Valley Residences', 'Suburb Area', '456 Green Avenue, Suburb Area', NULL, NULL, NULL, NULL, 'active', '2026-02-11 23:50:38', '2026-02-11 23:50:38'),
(9, 'Ocean View Towers', 'Beach Side', '789 Ocean Road, Beach Side', NULL, NULL, NULL, NULL, 'active', '2026-02-11 23:50:38', '2026-02-11 23:50:38'),
(10, 'Mountain Heights', 'Hill Station', '321 Mountain Peak, Hill Station', NULL, NULL, NULL, NULL, 'active', '2026-02-11 23:50:38', '2026-02-11 23:50:38'),
(11, 'City Center Plaza', 'City Center', '654 Plaza Drive, City Center', NULL, NULL, NULL, NULL, 'active', '2026-02-11 23:50:38', '2026-02-11 23:50:38'),
(12, 'Sunshine Apartments', 'Downtown', '123 Main Street, Downtown', NULL, NULL, NULL, NULL, 'active', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(13, 'Green Valley Residences', 'Suburb Area', '456 Green Avenue, Suburb Area', NULL, NULL, NULL, NULL, 'active', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(14, 'Ocean View Towers', 'Beach Side', '789 Ocean Road, Beach Side', NULL, NULL, NULL, NULL, 'active', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(15, 'Mountain Heights', 'Hill Station', '321 Mountain Peak, Hill Station', NULL, NULL, NULL, NULL, 'active', '2026-02-13 01:30:42', '2026-02-13 08:14:05'),
(16, 'City Center Plaza', 'City Center', '654 Plaza Drive, City Center', NULL, NULL, NULL, NULL, 'active', '2026-02-13 01:30:42', '2026-02-13 01:30:42');

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

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2026_02_11_070346_create_apartments_table', 1),
(5, '2026_02_11_070347_create_technicians_table', 1),
(6, '2026_02_11_070351_create_tickets_table', 1),
(7, '2026_02_11_070450_add_is_admin_to_users_table', 1),
(8, '2026_02_11_072831_add_address_to_apartments_table', 1),
(9, '2026_02_11_102610_add_location_details_to_tickets_table', 2),
(10, '2026_02_11_102653_make_last_name_nullable_in_tickets_table', 3),
(11, '2026_02_11_102732_make_location_nullable_in_tickets_table', 4),
(13, '2026_02_11_103509_create_notifications_table', 5),
(14, '2026_02_12_140738_add_phase2_fields_to_apartments_table', 5),
(15, '2026_02_13_120000_create_tasks_table', 6),
(16, '2026_02_13_123000_create_payments_table', 7),
(17, '2026_02_13_130000_add_ticket_id_to_tasks_table', 8),
(18, '2026_02_13_140000_update_payments_table_add_upi_debt_and_customer', 9),
(19, '2026_02_13_150000_add_debt_notes_to_payments_table', 10);

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

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

CREATE TABLE `notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `notifications` (`id`, `ticket_id`, `type`, `is_read`, `created_at`, `updated_at`) VALUES
(1, 36, 'New Ticket Raised', 0, '2026-02-13 05:17:29', '2026-02-13 05:17:29'),
(2, 37, 'New Ticket Raised', 0, '2026-02-13 05:20:48', '2026-02-13 05:20:48'),
(3, 38, 'New Ticket Raised', 0, '2026-02-13 05:21:29', '2026-02-13 05:21:29'),
(4, 39, 'New Ticket Raised', 0, '2026-02-13 05:24:43', '2026-02-13 05:24:43'),
(5, 40, 'New Ticket Raised', 0, '2026-02-13 05:41:30', '2026-02-13 05:41:30'),
(6, 41, 'New Ticket Raised', 0, '2026-02-13 06:21:13', '2026-02-13 06:21:13'),
(7, 42, 'New Ticket Raised', 0, '2026-02-13 06:23:17', '2026-02-13 06:23:17'),
(8, 43, 'New Ticket Raised', 0, '2026-02-13 06:24:47', '2026-02-13 06:24:47');

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `task_id` bigint(20) UNSIGNED NOT NULL,
  `technician_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `payment_method` enum('cash','bank_transfer','check','online','upi','debt') NOT NULL,
  `payment_date` date NOT NULL,
  `transaction_id` varchar(255) DEFAULT NULL,
  `upi_id` varchar(255) DEFAULT NULL,
  `upi_transaction_id` varchar(255) DEFAULT NULL,
  `check_number` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `debt_notes` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `status` enum('pending','paid','failed') NOT NULL DEFAULT 'pending',
  `processed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `processed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `payments` (`id`, `task_id`, `technician_id`, `amount`, `customer_name`, `payment_method`, `payment_date`, `transaction_id`, `upi_id`, `upi_transaction_id`, `check_number`, `bank_name`, `debt_notes`, `notes`, `status`, `processed_by`, `processed_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '250.00', 'Robert Johnson', 'bank_transfer', '2026-02-12', 'TXN123456789', NULL, NULL, NULL, 'First National Bank', NULL, 'Emergency gas leak repair completed successfully', 'paid', 1, '2026-02-12 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(2, 2, 2, '180.50', 'Maria Garcia', 'cash', '2026-02-11', NULL, NULL, NULL, NULL, NULL, NULL, 'Digital gas meter installation - paid in cash', 'paid', 1, '2026-02-11 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(3, 3, 3, '120.00', 'William Chen', 'check', '2026-02-10', NULL, NULL, NULL, 'CHK001234', 'City Bank', NULL, 'Annual gas heater maintenance', 'paid', 1, '2026-02-10 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(4, 5, 4, '450.75', 'Jennifer Smith', 'online', '2026-02-08', 'ONL987654321', NULL, NULL, NULL, NULL, NULL, 'New gas line installation for Apartment 501', 'paid', 1, '2026-02-08 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(5, 8, 3, '95.00', 'David Wilson', 'upi', '2026-02-09', NULL, 'david@upi', 'UTR456789123', NULL, NULL, NULL, 'Gas pipe minor repair - UPI payment received', 'paid', 1, '2026-02-09 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(6, 9, 2, '320.00', 'Lisa Anderson', 'debt', '2026-02-07', NULL, NULL, NULL, NULL, NULL, 'Customer requested to pay in installments. First payment due in 30 days.', 'Major gas line replacement - payment arrangement made', 'paid', 1, '2026-02-07 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(7, 10, 4, '75.25', 'James Taylor', 'cash', '2026-02-06', NULL, NULL, NULL, NULL, NULL, NULL, 'Gas stove connection and safety check', 'paid', 1, '2026-02-06 07:22:01', '2026-02-13 07:22:01', '2026-02-13 07:22:01'),
(8, 12, 3, '200.00', 'Patricia Brown', 'bank_transfer', '2026-02-05', 'TXN555666777', NULL, NULL, NULL, 'Community Trust Bank', NULL, 'Emergency gas shut-off system repair', 'pending', 1, NULL, '2026-02-13 07:22:01', '2026-02-13 07:22:01');

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('1dP6KiBw5aVYoy7i8Xu4V0eIwt6UKTAez5Jq6Nsg', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiRDBYeExVZXpIUEF2R0ZVWm5qNHRVMUJUekZqQnhqR0FVTDljYUpkRCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NTA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9hZG1pbi9yZXBvcnRzL2FwYXJ0bWVudC13aXNlIjtzOjU6InJvdXRlIjtzOjIzOiJhZG1pbi5yZXBvcnRzLmFwYXJ0bWVudCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjE7fQ==', 1771052629),
('uqxQ263ZDHCpEiqThh74ZU0GIoigPYj7G4DJ0m2Z', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiTXlLdkZlZGFKRTFKU0ZQZnVKcHNrR1VUQ3d5TmY5MzN4eHl2bzRmMyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mjc6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9sb2dpbiI7czo1OiJyb3V0ZSI7czo1OiJsb2dpbiI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1771048024);

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

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `technician_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` enum('pending','assigned','in_progress','completed') NOT NULL DEFAULT 'pending',
  `priority` enum('low','medium','high') NOT NULL DEFAULT 'medium',
  `assigned_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `payment_amount` decimal(10,2) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_method` enum('cash','bank_transfer','check','online') DEFAULT NULL,
  `payment_notes` text DEFAULT NULL,
  `admin_notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `ticket_id`, `title`, `description`, `technician_id`, `status`, `priority`, `assigned_at`, `completed_at`, `payment_amount`, `payment_date`, `payment_method`, `payment_notes`, `admin_notes`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Fix Gas Leak in Apartment 101', 'Customer reported gas leak in kitchen area. Need to inspect and repair gas line connection to stove.', 1, 'completed', 'high', '2026-02-10 01:30:42', '2026-02-12 01:30:42', '250.00', '2026-02-12', 'bank_transfer', 'Emergency repair completed successfully. Customer satisfied with service.', 'Urgent repair - customer safety priority', '2026-02-09 01:30:42', '2026-02-13 01:30:42'),
(2, NULL, 'Install New Gas Meter', 'Install digital gas meter for Apartment 205. Old meter needs replacement due to accuracy issues.', 2, 'completed', 'medium', '2026-02-08 01:30:42', '2026-02-11 01:30:42', '180.50', '2026-02-11', 'cash', 'Customer paid in cash after installation', 'Scheduled maintenance', '2026-02-07 01:30:42', '2026-02-13 01:30:42'),
(3, NULL, 'Routine Gas Line Inspection', 'Annual inspection of gas lines in Building A. Check all connections and pressure levels.', 3, 'completed', 'low', '2026-02-12 19:30:42', '2026-02-13 05:37:17', NULL, NULL, NULL, NULL, 'Annual safety inspection - Building A', '2026-02-12 01:30:42', '2026-02-13 05:37:17'),
(4, NULL, 'Emergency Gas Shut-off Repair', 'Customer accidentally triggered emergency shut-off. Need to reset and inspect system for safety.', NULL, 'pending', 'high', NULL, NULL, NULL, NULL, NULL, NULL, 'Emergency service required - customer waiting', '2026-02-12 23:30:42', '2026-02-13 01:30:42'),
(5, NULL, 'Gas Stove Installation', 'Install new gas stove in Apartment 302. Connect gas line and test for leaks.', 4, 'completed', 'medium', '2026-02-11 01:30:42', '2026-02-12 13:30:42', NULL, NULL, NULL, NULL, 'Customer requested professional installation', '2026-02-10 01:30:42', '2026-02-13 01:30:42'),
(6, NULL, 'Gas Pipe Replacement', 'Replace corroded gas pipe section in Building B basement. Preventive maintenance.', 1, 'assigned', 'high', '2026-02-12 17:30:42', NULL, NULL, NULL, NULL, NULL, 'Critical infrastructure maintenance', '2026-02-12 15:30:42', '2026-02-13 01:30:42'),
(7, NULL, 'Customer Gas Bill Inquiry', 'Customer concerned about high gas bill. Need to check for leaks and meter accuracy.', NULL, 'pending', 'low', NULL, NULL, NULL, NULL, NULL, NULL, 'Customer service - investigate billing concern', '2026-02-12 21:30:42', '2026-02-13 01:30:42'),
(8, NULL, 'Gas Heater Maintenance', 'Annual maintenance of gas heating system in Apartment 405. Clean and test all components.', 3, 'completed', 'medium', '2026-02-09 01:30:42', '2026-02-10 01:30:42', '120.00', '2026-02-10', 'check', 'Check #1234 from customer', 'Seasonal maintenance completed', '2026-02-08 01:30:42', '2026-02-13 01:30:42'),
(9, NULL, 'New Gas Line Installation', 'Install new gas line for newly constructed Apartment 501. Full installation from main line.', 2, 'completed', 'high', '2026-02-06 01:30:42', '2026-02-08 01:30:42', '450.75', '2026-02-08', 'online', 'Paid via online banking - Transaction ID: TXN789456', 'New construction project - Building C', '2026-02-05 01:30:42', '2026-02-13 01:30:42'),
(10, NULL, 'Gas Leak Detection Test', 'Perform gas leak detection test in Apartment 201 after customer reported smell.', 4, 'completed', 'high', '2026-02-12 22:30:42', '2026-02-13 05:36:36', NULL, NULL, NULL, NULL, 'Safety inspection - customer concern', '2026-02-12 20:30:42', '2026-02-13 05:36:36'),
(11, NULL, 'cleaning', 'efggh', 1, 'assigned', 'low', '2026-02-13 05:34:47', NULL, NULL, NULL, NULL, NULL, 'gdfghghj', '2026-02-13 05:34:47', '2026-02-13 05:34:47'),
(12, NULL, 'aes', 'ertghfjy', 3, 'completed', 'high', '2026-02-13 05:38:17', '2026-02-13 05:38:53', NULL, NULL, NULL, NULL, 'dfgbh', '2026-02-13 05:38:17', '2026-02-13 05:38:53');

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

--
-- Table structure for table `technicians`
--

CREATE TABLE `technicians` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `status` enum('free','assigned') NOT NULL DEFAULT 'free',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `technicians`
--

INSERT INTO `technicians` (`id`, `name`, `email`, `phone`, `status`, `created_at`, `updated_at`) VALUES
(1, 'John Smith', 'john.smith@gasfilling.com', '+1234567890', 'assigned', '2026-02-11 02:21:27', '2026-02-13 05:34:47'),
(2, 'Mike Johnson', 'mike.johnson@gasfilling.com', '+0987654321', 'assigned', '2026-02-11 02:21:27', '2026-02-13 01:57:46'),
(3, 'David Wilson', 'david.wilson@gasfilling.com', '+1122334455', 'free', '2026-02-11 02:21:27', '2026-02-13 05:38:53'),
(4, 'John Smith', 'john.smith@vgas.com', '555-0101', 'free', '2026-02-13 01:30:42', '2026-02-13 05:36:36'),
(5, 'Sarah Johnson', 'sarah.johnson@vgas.com', '555-0102', 'assigned', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(6, 'Mike Wilson', 'mike.wilson@vgas.com', '555-0103', 'free', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(7, 'Emily Davis', 'emily.davis@vgas.com', '555-0104', 'assigned', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(8, 'Robert Brown', 'robert.brown@vgas.com', '555-0105', 'free', '2026-02-13 01:30:42', '2026-02-13 01:30:42'),
(9, 'Lisa Anderson', 'lisa.anderson@vgas.com', '555-0106', 'assigned', '2026-02-13 01:30:42', '2026-02-13 05:37:50');

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

--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` varchar(255) NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) NOT NULL,
  `apartment_id` bigint(20) UNSIGNED NOT NULL,
  `block_name` varchar(255) NOT NULL,
  `floor_number` varchar(255) NOT NULL,
  `room_number` varchar(255) NOT NULL,
  `area` varchar(255) DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `priority` enum('low','medium','high') NOT NULL DEFAULT 'medium',
  `issue_description` text NOT NULL,
  `status` enum('open','assigned','in_progress','completed') NOT NULL DEFAULT 'open',
  `technician_id` bigint(20) UNSIGNED DEFAULT NULL,
  `date_raised` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tickets`
--

INSERT INTO `tickets` (`id`, `ticket_id`, `first_name`, `last_name`, `email`, `phone`, `apartment_id`, `block_name`, `floor_number`, `room_number`, `area`, `location`, `priority`, `issue_description`, `status`, `technician_id`, `date_raised`, `created_at`, `updated_at`) VALUES
(1, 'GAS-WJNT1KZ4', 'Test', NULL, NULL, '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 04:58:16', '2026-02-11 04:58:16'),
(2, 'GAS-PEAZ7JZK', 'Ronan', 'Cash', 'hygodibeno@mailinator.com', '+1 (791) 601-3872', 5, 'Alexa Hernandez', '611', '114', 'Eos consequat Elit', NULL, 'high', 'Sunt qui inventore d', 'open', NULL, '2026-02-11', '2026-02-11 04:58:47', '2026-02-11 04:58:47'),
(3, 'GAS-4NMIQUPK', 'Ronan', 'Cash', 'hygodibeno@mailinator.com', '+1 (791) 601-3872', 5, 'Alexa Hernandez', '611', '114', 'Eos consequat Elit', NULL, 'high', 'Sunt qui inventore d', 'open', NULL, '2026-02-11', '2026-02-11 04:59:08', '2026-02-11 04:59:08'),
(4, 'GAS-ZOHMXSRQ', 'Test', NULL, NULL, '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:00:52', '2026-02-11 05:00:52'),
(5, 'GAS-NNSQIFP8', 'Test', NULL, NULL, '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:01:12', '2026-02-11 05:01:12'),
(6, 'GAS-34JVTWIP', 'Test', NULL, NULL, '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:01:40', '2026-02-11 05:01:40'),
(7, 'GAS-XYKPERP2', 'Test', NULL, NULL, '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:02:25', '2026-02-11 05:02:25'),
(8, 'GAS-OTQPSURO', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:03:10', '2026-02-11 05:03:10'),
(9, 'GAS-7DRNJHIT', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:03:39', '2026-02-11 05:03:39'),
(10, 'GAS-ZYWERYPH', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:04:31', '2026-02-11 05:04:31'),
(11, 'GAS-DMYHKL0F', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:04:52', '2026-02-11 05:04:52'),
(12, 'GAS-0VNNY4ZX', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:05:37', '2026-02-11 05:05:37'),
(13, 'GAS-PVJRIDGD', 'Test', NULL, 'test@example.com', '1234567890', 1, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-11', '2026-02-11 05:05:55', '2026-02-11 05:05:55'),
(14, 'GAS-KRCH4ITL', 'Tarik', 'Ward', 'xufyle@mailinator.com', '+1 (351) 917-1356', 5, 'Shay Spears', '58', '432', 'Voluptates est anim', NULL, 'medium', 'Omnis mollitia atque', 'open', NULL, '2026-02-11', '2026-02-11 05:06:32', '2026-02-11 05:06:32'),
(15, 'GAS-WB0ILZGO', 'Owen', 'Banks', 'siva.frontdev@gmail.com', '+1 (654) 579-8282', 5, 'Drew Mcpherson', '777', '297', 'Aut quod est nulla i', NULL, 'low', 'Sint non cumque ess', 'open', NULL, '2026-02-11', '2026-02-11 05:06:57', '2026-02-11 05:06:57'),
(16, 'GAS-3CNFHS9U', 'Amal', 'Park', 'siva.frontdev@gmail.com', '+1 (274) 532-1725', 5, 'Cynthia Rowland', '785', '136', 'Quia repudiandae fug', NULL, 'high', 'Eiusmod laboris quis', 'open', NULL, '2026-02-11', '2026-02-11 05:18:23', '2026-02-11 05:18:23'),
(17, 'GAS-NQAPYSE8', 'Kelly', 'Murphy', 'anulokeshmurugan@gmail.com', '+1 (819) 397-7753', 5, 'Elmo Curry', '722', '210', 'Voluptate excepturi', NULL, 'high', 'Voluptate voluptates', 'open', NULL, '2026-02-11', '2026-02-11 05:36:42', '2026-02-11 05:36:42'),
(18, 'GAS-O3O7RVUN', 'Rinah', 'Hoover', 'nithyalokesh0628@gmail.com', '+1 (494) 938-1399', 5, 'Jocelyn Carpenter', '685', '211', 'Est facilis omnis in', NULL, 'medium', 'Aperiam iste ipsa q', 'assigned', 2, '2026-02-11', '2026-02-11 06:23:03', '2026-02-13 01:57:46'),
(19, 'GAS-9J5JBJCH', 'Thane', 'Hickman', 'zoky@mailinator.com', '+1 (728) 672-3695', 5, 'Sylvia Clayton', '249', '366', 'Non voluptas a sunt', NULL, 'high', 'Qui eius culpa sit', 'open', NULL, '2026-02-11', '2026-02-11 06:32:39', '2026-02-11 06:32:39'),
(20, 'GAS-4GEILFTZ', 'Chiquita', 'Bowers', 'siva.frontdev@gmail.com', '+1 (347) 891-8627', 5, 'Tarik Berg', '395', '802', 'Anim recusandae Ali', NULL, 'low', 'Ex sint recusandae', 'open', NULL, '2026-02-11', '2026-02-11 06:33:22', '2026-02-11 06:33:22'),
(21, 'GAS-N3BP2RHJ', 'Aline', 'Garza', 'siva.frontdev@gmail.com', '+1 (328) 652-2006', 5, 'Philip Holloway', '249', '958', 'Reprehenderit sunt', NULL, 'medium', 'Voluptate unde labor', 'open', NULL, '2026-02-11', '2026-02-11 06:40:11', '2026-02-11 06:40:11'),
(22, 'GAS-1BXBPBGM', 'Noelani', 'Arnold', 'ritynube@mailinator.com', '+1 (977) 763-1034', 5, 'Sonya Shaw', '480', '431', 'Sapiente non natus q', NULL, 'high', 'Explicabo Earum et', 'assigned', 9, '2026-02-12', '2026-02-11 23:53:51', '2026-02-13 05:37:50'),
(23, 'GAS-HUGFPKKK', 'Anjolie', 'Gillespie', 'sasipac2@gmail.com', '+1 (887) 175-2009', 10, 'Lane Wells', '507', '5', 'Harum id quis incid', NULL, 'low', 'Impedit tempor culp', 'open', NULL, '2026-02-12', '2026-02-11 23:54:38', '2026-02-11 23:54:38'),
(24, 'GAS-NBU17ALD', 'Kathleen', 'Fitzgerald', 'wyfutage@mailinator.com', '+1 (729) 528-3747', 10, 'Idola Tucker', '752', '746', 'Adipisci voluptatem', NULL, 'low', 'Commodo molestiae im', 'open', NULL, '2026-02-12', '2026-02-12 00:01:46', '2026-02-12 00:01:46'),
(25, 'GAS-ZIG6TJ9G', 'Wendy', 'Petty', 'anulokeshmurugan@gmail.com', '+1 (216) 814-4346', 10, 'Samuel Tyson', '977', '797', 'Atque nobis adipisci', NULL, 'medium', 'Aut qui numquam illu', 'open', NULL, '2026-02-12', '2026-02-12 00:02:21', '2026-02-12 00:02:21'),
(26, 'GAS-E0PTDKYL', 'Ray', 'Hunter', 'pibogaret@mailinator.com', '+1 (859) 815-7861', 6, 'Levi Quinn', '357', '571', 'Sit vel commodi arc', NULL, 'low', 'Nemo veritatis est', 'open', NULL, '2026-02-12', '2026-02-12 00:05:00', '2026-02-12 00:05:00'),
(27, 'GAS-3Q7EOVGA', 'Samantha', 'Watts', 'dextrawebdeveloper@gmail.com', '+1 (972) 267-8513', 10, 'Lillian Rowe', '724', '119', 'Modi reprehenderit', NULL, 'high', 'Doloribus et adipisc', 'open', NULL, '2026-02-12', '2026-02-12 00:05:31', '2026-02-12 00:05:31'),
(28, 'GAS-VRXV0AKI', 'Irma', 'Head', 'dextrawebdeveloper@gmail.com', '+1 (491) 621-4574', 10, 'Jin Schneider', '936', '587', 'Et adipisci fugiat', NULL, 'low', 'Exercitation quis ut', 'open', NULL, '2026-02-12', '2026-02-12 00:11:32', '2026-02-12 00:11:32'),
(29, 'GAS-HJPN3GJ9', 'Illiana', 'Pearson', 'anulokeshmurugan@gmail.com', '+1 (462) 643-5698', 6, 'Lara Church', '260', '966', 'Laudantium qui magn', NULL, 'low', 'Ullamco velit sit en', 'open', NULL, '2026-02-12', '2026-02-12 02:11:05', '2026-02-12 02:11:05'),
(30, 'GAS-RCCZU0O3', 'fsfgdfhgh', 'dfgfgjgf', 'loki@gmail.com', '89034523445', 5, '2334', '345345', '234324', NULL, NULL, 'high', 'fgdfhgbfhn', 'open', NULL, '2026-02-12', '2026-02-12 07:06:56', '2026-02-12 07:06:56'),
(31, 'GAS-YY2XFAWX', 'Test', NULL, NULL, '1234567890', 11, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-12', '2026-02-12 07:13:32', '2026-02-12 07:13:32'),
(32, 'GAS-AYJT4SDK', 'Dane', 'Stevens', 'mutivy@mailinator.com', '+1 (319) 918-1604', 5, 'Martina Benson', '566', '904', 'Rerum consequatur Q', NULL, 'medium', 'Tempore quo recusan', 'open', NULL, '2026-02-12', '2026-02-12 07:13:44', '2026-02-12 07:13:44'),
(33, 'GAS-FSYQBUHX', 'Test', NULL, NULL, '1234567890', 11, 'A', '1', '101', NULL, NULL, 'low', 'Test issue', 'open', NULL, '2026-02-12', '2026-02-12 07:15:30', '2026-02-12 07:15:30'),
(34, 'GAS-5IUYL2FU', 'Carol', 'Richardson', 'xewareg611@daikoa.com', '+1 (853) 345-9947', 8, 'Phillip Cooke', '400', '754', 'Dolor molestias ut e', NULL, 'low', 'Aut perferendis inci', 'open', NULL, '2026-02-12', '2026-02-12 07:16:43', '2026-02-12 07:16:43'),
(35, 'GAS-MD2AH82H', 'Courtney', 'Buckley', 'hawolo5260@homuno.com', '+1 (432) 475-1205', 8, 'Stone Patton', '185', '157', 'Ea id eius dolor om', NULL, 'low', 'Dolore accusantium v', 'open', NULL, '2026-02-12', '2026-02-12 07:18:12', '2026-02-12 07:18:12'),
(36, 'GAS-OBPX8D0N', 'John', 'Doe', 'john@example.com', '1234567890', 11, 'A', '3', '301', NULL, NULL, 'medium', 'Test issue', 'open', NULL, '2026-02-13', '2026-02-13 05:17:29', '2026-02-13 05:17:29'),
(37, 'GAS-IA9HJ6M9', 'Wing', 'Yates', 'horicynyt@mailinator.com', '+1 (815) 592-5329', 13, 'Neil Burks', '210', '54', NULL, NULL, 'high', 'Molestias mollit inc', 'open', NULL, '2026-02-13', '2026-02-13 05:20:48', '2026-02-13 05:20:48'),
(38, 'GAS-XXVNBVDL', 'Herrod', 'Bishop', 'siva.frontdev@gmail.com', '+1 (945) 841-5505', 13, 'Destiny Matthews', '525', '493', NULL, NULL, 'medium', 'Consectetur maiores', 'open', NULL, '2026-02-13', '2026-02-13 05:21:29', '2026-02-13 05:21:29'),
(39, 'GAS-ZFMYOFEL', 'Anjolie', 'Perkins', 'siva.rufeuse@gmail.com', '+1 (503) 775-5174', 9, 'Imani Tanner', '981', '299', NULL, NULL, 'high', 'Exercitation dolore', 'assigned', 4, '2026-02-13', '2026-02-13 05:24:43', '2026-02-13 05:34:04'),
(40, 'GAS-AU2WDRXA', 'Gabriel', 'Willis', 'tynyfafewe@mailinator.com', '+1 (483) 969-7213', 10, 'Madaline Gordon', '960', '202', NULL, NULL, 'medium', 'Pariatur Necessitat', 'open', NULL, '2026-02-13', '2026-02-13 05:41:30', '2026-02-13 05:41:30'),
(41, 'GAS-0SQZYLQ3', 'Kristen', 'Bush', 'lagy@mailinator.com', '+1 (592) 494-5853', 10, 'Steven Petty', '441', '772', NULL, NULL, 'low', 'Rerum qui ab qui cor', 'open', NULL, '2026-02-13', '2026-02-13 06:21:13', '2026-02-13 06:21:13'),
(42, 'GAS-YASNJPF4', 'Kristen', 'Bush', 'lagy@mailinator.com', '+1 (592) 494-5853', 10, 'Steven Petty', '441', '772', NULL, NULL, 'low', 'Rerum qui ab qui cor', 'open', NULL, '2026-02-13', '2026-02-13 06:23:17', '2026-02-13 06:23:17'),
(43, 'GAS-BOUPUSDH', 'giuoi', 'j', 'loki@gmail.com', '87865456789', 10, '556', '566', '346', NULL, NULL, 'high', '45t4yrthtr', 'open', NULL, '2026-02-13', '2026-02-13 06:24:47', '2026-02-13 06:24:47');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `is_admin` tinyint(1) NOT NULL DEFAULT 0,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `is_admin`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@gasfilling.com', NULL, '$2y$12$zY8ozogayYG5yK00CTltvOSfQBVwAfnUmOHp/paj7eYTaCZnpf0Ta', 1, 'ju7oIMaIqBXuzrHPX4r8GrqpJ7Tap73bWazgKU85shrVofqpr295WHiVaDhs', '2026-02-11 02:21:27', '2026-02-11 02:21:27'),
(2, 'Test User', 'test@example.com', '2026-02-13 01:30:42', '$2y$12$5xm9GB.dpTI1rANp3Ej/1OG/5a7tNyQqdLrvCQMMqxGsJWUZiHHx2', 0, 'qpPm1R2Q10', '2026-02-13 01:30:42', '2026-02-13 01:30:42');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notifications_ticket_id_foreign` (`ticket_id`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payments_task_id_foreign` (`task_id`),
  ADD KEY `payments_technician_id_foreign` (`technician_id`),
  ADD KEY `payments_processed_by_foreign` (`processed_by`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tasks_technician_id_foreign` (`technician_id`),
  ADD KEY `tasks_ticket_id_foreign` (`ticket_id`);

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

--
-- Indexes for table `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tickets_ticket_id_unique` (`ticket_id`),
  ADD KEY `tickets_apartment_id_foreign` (`apartment_id`),
  ADD KEY `tickets_technician_id_foreign` (`technician_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `apartments`
--
ALTER TABLE `apartments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `technicians`
--
ALTER TABLE `technicians`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `notifications_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `payments_processed_by_foreign` FOREIGN KEY (`processed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `payments_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payments_technician_id_foreign` FOREIGN KEY (`technician_id`) REFERENCES `technicians` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `tasks_technician_id_foreign` FOREIGN KEY (`technician_id`) REFERENCES `technicians` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tasks_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_apartment_id_foreign` FOREIGN KEY (`apartment_id`) REFERENCES `apartments` (`id`),
  ADD CONSTRAINT `tickets_technician_id_foreign` FOREIGN KEY (`technician_id`) REFERENCES `technicians` (`id`);
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 */;
