CREATE TABLE IF NOT EXISTS projects (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    description TEXT,
    status ENUM('Planning', 'In Progress', 'Completed') DEFAULT 'Planning',
    budget DECIMAL(15, 2),
    start_date DATE,
    end_date DATE,
    image VARCHAR(255),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS services (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    icon VARCHAR(100),
    description TEXT,
    long_description TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS teams (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    role VARCHAR(255),
    bio TEXT,
    image VARCHAR(255),
    facebook VARCHAR(255),
    twitter VARCHAR(255),
    instagram VARCHAR(255),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS enquiries (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    project_type VARCHAR(255),
    message TEXT,
    status ENUM('New', 'Read', 'Replied') DEFAULT 'New',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Seed some initial data
INSERT INTO services (title, icon, description, long_description) VALUES
('General Contracting', 'bi-shield-check', 'Expert management of your construction project from start to finish.', 'We provide comprehensive general contracting services, ensuring that every aspect of your project is handled with professionalism and care. From initial site preparation to final inspections, our team oversees the entire process, coordinating subcontractors and maintaining strict quality standards.'),
('Design-Build', 'bi-pencil-square', 'A streamlined approach that combines design and construction services.', 'Our design-build service offers a single point of responsibility for your project. By integrating the design and construction phases, we minimize risks, reduce timelines, and ensure that the final result perfectly matches your vision and budget.'),
('Renovation & Remodeling', 'bi-hammer', 'Transforming existing spaces into modern, functional environments.', 'Whether it is a residential home or a commercial office, our renovation experts can revitalize your space. We specialize in high-quality craftsmanship and innovative designs that breathe new life into older structures.'),
('Infrastructure Development', 'bi-building-gear', 'Large-scale construction of essential public and private facilities.', 'We have the expertise and resources to handle complex infrastructure projects, including roads, bridges, and utilities. Our commitment to sustainability and durability ensures that our projects stand the test of time.');

INSERT INTO projects (title, description, status, budget, start_date, image) VALUES
('City Center Plaza', 'A multi-story commercial complex in the heart of the city.', 'In Progress', 5000000.00, '2026-01-15', 'project1.jpg'),
('Green Valley Residences', 'Eco-friendly housing project featuring 50 modern villas.', 'Planning', 12000000.00, '2026-06-01', 'project2.jpg'),
('Skyline Bridge', 'Modern suspension bridge connecting the northern suburbs.', 'Completed', 8500000.00, '2025-03-10', 'project3.jpg');

INSERT INTO teams (name, role, bio, image) VALUES
('John Doe', 'Chief Engineer', 'With over 20 years of experience in structural engineering.', 'team1.jpg'),
('Jane Smith', 'Project Manager', 'Specializes in large-scale residential developments.', 'team2.jpg'),
('Robert Brown', 'Lead Architect', 'Award-winning architect with a focus on sustainable design.', 'team3.jpg');
