-- =============================================================
--  Uppal Construction LLC — Website Database Schema
--  Project Inquiry / Contact Us system
--
--  Target database (already created in cPanel):
--      uppalgroupcp_uppal_website
--
--  Import this file INTO that database via phpMyAdmin
--  (select the database first, then Import). This file does
--  NOT create or switch databases, so it is safe to import
--  into the pre-selected database.
--
--  Engine: InnoDB   |   Charset: utf8mb4 (full Unicode)
-- =============================================================

SET NAMES utf8mb4;
SET time_zone = '+00:00';

-- -------------------------------------------------------------
--  Table: contact_inquiries
--  One row per submitted Project Inquiry from the website form.
-- -------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `contact_inquiries` (
  `id`                       BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `full_name`                VARCHAR(120)  NOT NULL,
  `company_name`             VARCHAR(160)  DEFAULT NULL,
  `email`                    VARCHAR(190)  NOT NULL,
  `phone`                    VARCHAR(40)   NOT NULL,
  `project_type`             VARCHAR(60)   NOT NULL,
  `estimated_budget`         VARCHAR(60)   DEFAULT NULL,
  `project_location`         VARCHAR(160)  NOT NULL,
  `preferred_contact_method` VARCHAR(20)   DEFAULT NULL,
  `message`                  TEXT          NOT NULL,
  -- Workflow status: new | read | contacted | closed | spam
  `status`                   VARCHAR(20)   NOT NULL DEFAULT 'new',
  `created_at`               TIMESTAMP     NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_status`     (`status`),
  KEY `idx_created_at` (`created_at`),
  KEY `idx_email`      (`email`)
) ENGINE=InnoDB
  DEFAULT CHARSET=utf8mb4
  COLLATE=utf8mb4_unicode_ci;
