-- Contact form submissions table
CREATE TABLE IF NOT EXISTS contact_submissions (
    id CHAR(36) PRIMARY KEY DEFAULT (UUID()),
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    phone VARCHAR(50),
    company VARCHAR(255),
    inquiry_type VARCHAR(100),
    subject VARCHAR(500),
    message TEXT NOT NULL,
    ip_address VARCHAR(45),
    user_agent TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_email (email),
    INDEX idx_inquiry_type (inquiry_type),
    INDEX idx_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Career applications table
CREATE TABLE IF NOT EXISTS career_applications (
    id CHAR(36) PRIMARY KEY DEFAULT (UUID()),
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    phone VARCHAR(50),
    location VARCHAR(255),
    position VARCHAR(255) NOT NULL,
    experience VARCHAR(100),
    employment_type VARCHAR(100),
    salary_expectation VARCHAR(100),
    notice_period VARCHAR(100),
    linkedin VARCHAR(500),
    portfolio VARCHAR(500),
    cover_letter TEXT,
    resume_uploaded BOOLEAN DEFAULT FALSE,
    ip_address VARCHAR(45),
    user_agent TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_email (email),
    INDEX idx_position (position),
    INDEX idx_experience (experience),
    INDEX idx_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;