-- Marketplace Tables
CREATE TABLE IF NOT EXISTS marketplace_listings (
    id VARCHAR(36) PRIMARY KEY,
    tenant_id VARCHAR(36) NOT NULL,
    office_name VARCHAR(200) NOT NULL,
    city VARCHAR(50) NOT NULL DEFAULT 'amman',
    specialty VARCHAR(50) NOT NULL DEFAULT 'general',
    description TEXT DEFAULT NULL,
    contact_phone VARCHAR(50) DEFAULT NULL,
    contact_email VARCHAR(100) DEFAULT NULL,
    rating DECIMAL(2,1) DEFAULT 0,
    is_featured TINYINT(1) DEFAULT 0,
    is_active TINYINT(1) DEFAULT 1,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT NULL,
    UNIQUE KEY uk_tenant (tenant_id),
    INDEX idx_city (city),
    INDEX idx_specialty (specialty),
    INDEX idx_active (is_active)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
