-- ALWISP Database Schema (skeleton)
CREATE DATABASE IF NOT EXISTS `alwisp` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `alwisp`;

-- Contact form submissions
CREATE TABLE IF NOT EXISTS `contacts` (
    `id`         INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    `name`       VARCHAR(120) NOT NULL,
    `email`      VARCHAR(255) NOT NULL,
    `phone`      VARCHAR(30),
    `subject`    VARCHAR(255),
    `message`    TEXT NOT NULL,
    `is_read`    TINYINT(1) NOT NULL DEFAULT 0,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

-- Service availability zones (placeholder)
CREATE TABLE IF NOT EXISTS `coverage_zones` (
    `id`          INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    `zone_name`   VARCHAR(120) NOT NULL,
    `description` TEXT,
    `active`      TINYINT(1) DEFAULT 1,
    `created_at`  TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;
