
CREATE TABLE agents (
    id INT AUTO_INCREMENT PRIMARY KEY,
    agency_name VARCHAR(255),
    email VARCHAR(255),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE clients (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(100),
    last_name VARCHAR(100),
    email VARCHAR(255),
    phone VARCHAR(50),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE proposals (
    id INT AUTO_INCREMENT PRIMARY KEY,
    agent_id INT,
    client_id INT,
    proposal_name VARCHAR(255),
    proposal_json LONGTEXT,
    selected_quote_id INT DEFAULT NULL,
    status VARCHAR(50) DEFAULT 'draft',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
