CREATE TABLE IF NOT EXISTS portfolios (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    category TEXT,
    image TEXT,
    link TEXT,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS partners (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL,
    logo TEXT,
    link TEXT,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS services (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    description TEXT,
    icon TEXT,
    is_active INTEGER DEFAULT 1
);

CREATE TABLE IF NOT EXISTS one_off_services (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    price DECIMAL(10,2) NOT NULL,
    description TEXT
);

CREATE TABLE IF NOT EXISTS quantity_pricing (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    min_quantity INTEGER NOT NULL,
    unit_price DECIMAL(10,2) NOT NULL
);

-- Seed Initial Data for Demo
INSERT INTO quantity_pricing (min_quantity, unit_price) VALUES (1, 500.00);
INSERT INTO quantity_pricing (min_quantity, unit_price) VALUES (5, 450.00);
INSERT INTO quantity_pricing (min_quantity, unit_price) VALUES (10, 400.00);
INSERT INTO quantity_pricing (min_quantity, unit_price) VALUES (20, 350.00);
INSERT INTO quantity_pricing (min_quantity, unit_price) VALUES (50, 300.00);

INSERT INTO services (title, description, icon) VALUES ('Social Media Strategy', 'Planejamento completo para sua marca.', '🎨');
INSERT INTO services (title, description, icon) VALUES ('Design Premium', 'Artes exclusivas e luxuosas.', '✍️');

INSERT INTO one_off_services (title, price, description) VALUES ('Pack 10 Posts', 1500.00, 'Design e legenda inclusos.');
INSERT INTO one_off_services (title, price, description) VALUES ('Gestão de Tráfego', 2000.00, 'Configuração e acompanhamento mensal.');
