-- Exportação completa de dados
-- Data: 2026-01-11T09:29:36.179Z
-- Banco: maktubia_points

BEGIN;

-- Roles (9 registros)
INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (1, 'user', 'Cliente padrão', '{"friends":["read","create","accept","reject"],"profile":["read","update"],"rewards":["read","redeem"],"campaigns":["read"],"purchases":["read","create"],"transfers":["read","create"]}'::jsonb, true, '2025-10-31T08:00:47.000Z', '2025-10-31T08:00:47.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (28, 'admin', 'Administrador', '{"*":["*"]}'::jsonb, true, '2025-10-31T08:00:47.000Z', '2025-10-31T08:00:47.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (29, 'manager', 'Gerente', '{"users":["read","update"],"reports":["read","export"],"campaigns":["read","create","update","delete"],"customers":["read","create","update"],"dashboard":["read"],"purchases":["read","confirm","reject"],"establishments":["read","create","update","delete"]}'::jsonb, true, '2025-10-31T08:00:47.000Z', '2025-10-31T08:00:47.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (30, 'agent', 'Agente de campo com acesso limitado a empréstimos e clientes', '{"loans":["create","read","update"],"payments":["create","read"],"customers":["create","read","update"],"dashboard":["read"]}'::jsonb, true, '2025-10-31T08:00:47.000Z', '2025-10-31T08:00:47.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (31, 'vetter', 'Responsável por aprovações e vistoria', '{"loans":["read","approve"],"reports":["read"],"payments":["read"],"customers":["read"],"dashboard":["read"]}'::jsonb, true, '2025-10-31T08:00:47.000Z', '2025-10-31T08:00:47.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (37, 'supervisor', 'Supervisor', '{"users":["read"],"reports":["read"],"campaigns":["read","create","update"],"customers":["read","create","update"],"dashboard":["read"],"purchases":["read","confirm","reject"],"establishments":["read","update"]}'::jsonb, true, '2025-10-31T11:24:24.000Z', '2025-10-31T11:24:24.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (541, 'employee', 'Funcionário', '{"campaigns":["read"],"customers":["read","create"],"purchases":["read","confirm"],"establishments":["read"]}'::jsonb, true, '2025-11-03T18:59:06.000Z', '2025-11-03T18:59:06.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (542, 'cashier', 'Caixa', '{"customers":["read"],"purchases":["read","create","confirm"],"establishments":["read"]}'::jsonb, true, '2025-11-03T18:59:06.000Z', '2025-11-03T18:59:06.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO roles (role_id, role_name, role_description, permissions, is_active, created_at, updated_at)
VALUES (1018, 'merchant', 'Merchant - Gerente de estabelecimento', '{"profile":["read","update"],"reports":["read"],"campaigns":["read","create","update","delete"],"purchases":["read","confirm","reject"],"establishments":["read","update"]}'::jsonb, true, '2025-11-04T15:01:24.000Z', '2025-11-04T15:01:24.000Z')
ON CONFLICT (role_id) DO UPDATE SET
    role_name = EXCLUDED.role_name,
    role_description = EXCLUDED.role_description,
    permissions = EXCLUDED.permissions,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

-- Users (22 registros)
INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, last_login, user_code)
VALUES (2, 'hamam', 'nathan@connecter.com', '$2b$10$9ikfqqLEUXI5sFuLgYnmB.yY8F854/iGg5DLP8VkUWHH1qlfSLVYG', 'João', 'Silva', '+258840000000', 28, true, '2025-10-31T07:23:38.000Z', '2025-11-27T18:28:26.000Z', '2026-01-11T09:23:00.000Z', 'MK000002')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    user_code = EXCLUDED.user_code;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, user_code)
VALUES (3, 'hamab', 'bh@connecter.co.mz', '$2b$10$4EFEB6qaIoESXzLQpZ84u.TmG9mLjGblZENpASr4gKB158aZjloc.', 'Brayden', 'Hama', '842345740', 29, true, 2, '2025-11-01T19:22:26.000Z', '2025-11-01T19:22:26.000Z', 'MK000003')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, last_login, user_code, tipo_documento, numero_documento)
VALUES (4, 'joao.silva', 'joao.silva@example.com', '$2b$10$.Pt48AcTowGxDJW2f/kS3u3JS/qip4sKPikwWv2C/B0V989EECZiC', 'João', 'Silva', '+258841234567', 1, true, '2025-11-01T20:02:28.000Z', '2025-11-01T20:02:28.000Z', '2025-11-05T19:46:50.000Z', 'MK000004', 'BI', '1234567890123')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (5, 'maria.santos', 'maria.santos@example.com', '$2b$10$oCeDVmEkCrezo5j1UK3I1u0q4ZDdN/JKPhdWpShGM1RQZTxlDXVOq', 'Maria', 'Santos', '+258842345678', 1, true, '2025-11-01T20:02:28.000Z', '2025-11-01T20:02:28.000Z', 'MK000005', 'BI', '2345678901234')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (6, 'carlos.machava', 'carlos.machava@example.com', '$2b$10$08NTjeaIUjbfsE7.S5KBmub0Ekra6yIKjcknfDhGungTUxbESHIWW', 'Carlos', 'Machava', '+258843456789', 1, true, '2025-11-01T20:02:28.000Z', '2025-11-01T20:02:28.000Z', 'MK000006', 'BI', '3456789012345')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (7, 'ana.cossa', 'ana.cossa@example.com', '$2b$10$/B1WaGcQDdkWKjSpFTputOAHTHh.RLtZidHPb4OkCWBAwdZXH4h..', 'Ana', 'Cossa', '+258844567890', 1, true, '2025-11-01T20:02:29.000Z', '2025-11-01T20:02:29.000Z', 'MK000007', 'BI', '4567890123456')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (8, 'paulo.mendonca', 'paulo.mendonca@example.com', '$2b$10$irOf05uHoEpS3T2nUAGZzeCrFTmlXiyjRDXdQu6Nu0yzP0rg91duO', 'Paulo', 'Mendonça', '+258845678901', 1, true, '2025-11-01T20:02:29.000Z', '2025-11-01T20:02:29.000Z', 'MK000008', 'BI', '5678901234567')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (9, 'rita.mondlane', 'rita.mondlane@example.com', '$2b$10$6tm2mt7wS0s2xx7M63Uq.uORakXlAmSwi6r8jGzwF9TiEewkl1lAK', 'Rita', 'Mondlane', '+258846789012', 1, true, '2025-11-01T20:02:29.000Z', '2025-11-01T20:02:29.000Z', 'MK000009', 'BI', '6789012345678')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (10, 'manuel.chissano', 'manuel.chissano@example.com', '$2b$10$LX3vRj.WUi8kS/t0TmrDG.4rrFbTFMQ7f1AHDwypZ9gq7gtL6wDXS', 'Manuel', 'Chissano', '+258847890123', 1, true, '2025-11-01T20:02:29.000Z', '2025-11-01T20:02:29.000Z', 'MK000010', 'BI', '7890123456789')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (11, 'sofia.mabunda', 'sofia.mabunda@example.com', '$2b$10$WM/zAmtlr/DsHv79gEZ3Buq7X72vMbt.Fe0CHtx45QbQX0EBAQ0cK', 'Sofia', 'Mabunda', '+258848901234', 1, true, '2025-11-01T20:02:30.000Z', '2025-11-01T20:02:30.000Z', 'MK000011', 'BI', '8901234567890')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (12, 'lucas.dhlakama', 'lucas.dhlakama@example.com', '$2b$10$xhuBBCM3biTMVz4kyjZKOew1cjxSVg9q8dCiA71UhnJjguP/P8/eu', 'Lucas', 'Dhlakama', '+258849012345', 1, true, '2025-11-01T20:02:30.000Z', '2025-11-01T20:02:30.000Z', 'MK000012', 'BI', '9012345678901')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (13, 'helena.guamba', 'helena.guamba@example.com', '$2b$10$Y5oJtiojXkTDiAbeL8sn5eG7My8CN7ZNYZexUWga5zklXTYHywMGa', 'Helena', 'Guamba', '+258841112345', 1, true, '2025-11-01T20:02:30.000Z', '2025-11-01T20:02:30.000Z', 'MK000013', 'BI', '0123456789012')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (14, 'antonio.macuacua', 'antonio.macuacua@example.com', '$2b$10$v5Y6t1AczUe90ejYur395ev6KYsE6X3wYy.wuRM4TzKxjwCdjBB1e', 'António', 'Macuácua', '+258842223456', 1, true, '2025-11-01T20:02:31.000Z', '2025-11-01T20:02:31.000Z', 'MK000014', 'BI', '1234506789013')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (15, 'juliana.maganga', 'juliana.maganga@example.com', '$2b$10$SWdmGJB5WHheDy3knQ3sYukedYxZ5/Ud1y1Azl/.Adaa1sykEmTAG', 'Juliana', 'Maganga', '+258843334567', 1, true, '2025-11-01T20:02:31.000Z', '2025-11-01T20:02:31.000Z', 'MK000015', 'BI', '2345617890124')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, last_login, user_code, tipo_documento, numero_documento)
VALUES (16, 'dn', 'dn@gmail.com', '$2b$10$KD1ynez7Zra4uw9m6cwa2e9it2dGMr7q1hMzN1uacDOX6.1x05snK', 'Daniel', 'Nascimento', '863569802', 1, true, 2, '2025-11-01T20:46:32.000Z', '2025-11-02T20:52:06.000Z', '2025-11-02T21:37:47.000Z', 'MK000016', 'BI', '44565121546A')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_at, updated_at, last_login)
VALUES (17, 'merchant.test', 'merchant@test.com', '$2b$10$i/P9934i13AguDTw2h05DeA/e.EF/OrjyDMa6mRwYE5X2zH3Ga3Aa', 'Merchant', 'Test', '+258841111111', 1018, true, '2025-11-05T20:01:58.000Z', '2025-11-05T20:01:58.000Z', '2025-11-06T18:52:07.000Z')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, last_login, tipo_documento, numero_documento)
VALUES (18, 'jmachel', 'jmachel@gmail.com', '$2b$10$wsrsawQVkexeQmH7AxN7Q.jmfdIGnFyEy2g29hMLLFjhW8rKcHtNC', 'Josina', 'Machel', '8442134556', 1018, true, 2, '2025-11-06T22:38:11.000Z', '2025-11-06T22:38:11.000Z', '2025-11-27T18:27:27.000Z', 'PASSAPORTE', 'E565556')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, last_login, tipo_documento, numero_documento)
VALUES (19, 'jmachel2', 'jmachel3@gmail.com', '$2b$10$F.PiU00veEpMbJ9SjD.lneKjB9J08h0MuoyOjWi2zKMzVO1hgOkFq', 'Josina', 'Machel', '8442134553', 1018, true, 2, '2025-11-06T23:06:39.000Z', '2025-11-07T05:50:10.000Z', '2025-11-11T09:28:04.000Z', 'PASSAPORTE', 'E565516')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, tipo_documento, numero_documento)
VALUES (20, 'sfdsfd', 'jmasfdsfchel@gmail.com', '$2b$10$/yIymE8ig9E2a5ZTj3m/wOJ4RU/R/XtbpDOll0440QbGGbfrV3ndK', 'fdsfsfd', 'sfds', '+258863569800', 1018, true, 2, '2025-11-07T05:49:56.000Z', '2025-11-07T05:49:56.000Z', 'CARTA_CONDUCAO', 'ER454354')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, last_login, tipo_documento, numero_documento)
VALUES (21, 'af', 'af@marcohama.com', '$2b$10$o2XVfpMrOR/7.70l6.cPnOtfpoiO.Qxt6Co0.HJWDZn6ue7Z4B4.G', 'Alberto', 'Felix', '843567843', 1, true, 2, '2025-11-07T23:05:41.000Z', '2025-11-07T23:05:41.000Z', '2025-11-11T10:15:46.000Z', 'CARTA_CONDUCAO', 'ER45554555')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, is_active, created_at, updated_at, last_login)
VALUES (22, 'tm', 'tm@gmail.com', '$2b$10$qlRLEy.JywM7M0mwRfM3WOdmXXWkapyLeMHKolzgLgA5mHg3tOT/e', 'Teresa', 'Macaringue', '841523652', true, '2025-11-10T18:45:40.000Z', '2025-11-10T18:45:40.000Z', '2025-11-10T18:45:41.000Z')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    last_login = EXCLUDED.last_login;

INSERT INTO users (user_id, username, email, password_hash, first_name, last_name, phone, role_id, is_active, created_by, created_at, updated_at, user_code, tipo_documento, numero_documento)
VALUES (23, 'hamae', 'eh@connecter.co.mz', '$2b$10$bRRsMImpMPBpfKEpygPDM.AugYLx7APAmb0RWx4ewd21CyqhA4jCS', 'Elsa', 'K Hama', '+258842345740', 28, true, 2, '2025-12-02T13:01:40.000Z', '2025-12-02T13:01:40.000Z', 'MK0101', 'BI', '123456786A')
ON CONFLICT (user_id) DO UPDATE SET
    username = EXCLUDED.username,
    email = EXCLUDED.email,
    password_hash = EXCLUDED.password_hash,
    first_name = EXCLUDED.first_name,
    last_name = EXCLUDED.last_name,
    phone = EXCLUDED.phone,
    role_id = EXCLUDED.role_id,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    user_code = EXCLUDED.user_code,
    tipo_documento = EXCLUDED.tipo_documento,
    numero_documento = EXCLUDED.numero_documento;

-- Establishments (101 registros)
INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at, image_secondary)
VALUES ('EST_1762022401962_aqudz', 'Tina Daniel', 'Serviço', '/api/uploads/524584192_2576852795999014_8474407550454631207_n.jpg-mhgmn6ni.jpg', 208, 'Bairro do Zimpeto', '+258842345740', 'tinad@gmail.com', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '#4CAF50', true, 2, '2025-11-01T18:40:01.000Z', '2025-11-01T18:40:01.000Z', '/api/uploads/532535206_1268390501417230_6318724605079171531_n.jpg-mhgmn6nk.jpg')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    image_secondary = EXCLUDED.image_secondary;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762357103859_baqz8', 'Farmácia Saúde', 'Farmácia', 211, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'MAKTUBIA_PHARM_003', '#228B22', true, 16, '2025-11-05T15:38:23.000Z', '2025-11-05T15:38:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762357103884_ujsph', 'Loja de Roupas Fashion', 'Vestuário', 212, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'MAKTUBIA_FASHION_004', '#E91E63', true, 16, '2025-11-05T15:38:23.000Z', '2025-11-05T15:38:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762357103902_l1ly1', 'Posto de Combustível Shell', 'Combustível', 213, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'MAKTUBIA_SHELL_005', '#FFC107', true, 16, '2025-11-05T15:38:23.000Z', '2025-11-05T15:38:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358385827_7vxol', 'Restaurante Sabor', 'Restaurante', 244, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358385339_001', '#2196F3', true, 4, '2025-11-05T15:59:45.000Z', '2025-11-05T15:59:45.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358385890_zm3ip', 'Supermercado Bom Preço', 'Supermercado', 245, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358385339_002', '#4CAF50', true, 4, '2025-11-05T15:59:45.000Z', '2025-11-05T15:59:45.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358385904_y6y6y', 'Farmácia Saúde', 'Farmácia', 246, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358385339_003', '#228B22', true, 4, '2025-11-05T15:59:45.000Z', '2025-11-05T15:59:45.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358385924_n1zud', 'Loja de Roupas Fashion', 'Vestuário', 247, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358385339_004', '#E91E63', true, 4, '2025-11-05T15:59:45.000Z', '2025-11-05T15:59:45.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358385972_t21rd', 'Posto de Combustível Shell', 'Combustível', 248, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358385339_005', '#FFC107', true, 4, '2025-11-05T15:59:45.000Z', '2025-11-05T15:59:45.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358410899_e1tlb', 'Restaurante Sabor', 'Restaurante', 249, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358410684_001', '#2196F3', true, 4, '2025-11-05T16:00:10.000Z', '2025-11-05T16:00:10.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358410924_07o69', 'Supermercado Bom Preço', 'Supermercado', 250, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358410684_002', '#4CAF50', true, 4, '2025-11-05T16:00:10.000Z', '2025-11-05T16:00:10.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358410938_ov2yx', 'Farmácia Saúde', 'Farmácia', 251, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358410684_003', '#228B22', true, 4, '2025-11-05T16:00:10.000Z', '2025-11-05T16:00:10.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358410956_0xhqp', 'Loja de Roupas Fashion', 'Vestuário', 252, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358410684_004', '#E91E63', true, 4, '2025-11-05T16:00:10.000Z', '2025-11-05T16:00:10.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358410968_c6rap', 'Posto de Combustível Shell', 'Combustível', 253, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358410684_005', '#FFC107', true, 4, '2025-11-05T16:00:10.000Z', '2025-11-05T16:00:10.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358447280_72020', 'Restaurante Sabor', 'Restaurante', 254, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358447130_001', '#2196F3', true, 4, '2025-11-05T16:00:47.000Z', '2025-11-05T16:00:47.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358447299_xa1wm', 'Supermercado Bom Preço', 'Supermercado', 255, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358447130_002', '#4CAF50', true, 4, '2025-11-05T16:00:47.000Z', '2025-11-05T16:00:47.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358447310_zshbm', 'Farmácia Saúde', 'Farmácia', 256, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358447130_003', '#228B22', true, 4, '2025-11-05T16:00:47.000Z', '2025-11-05T16:00:47.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358447319_g1xe8', 'Loja de Roupas Fashion', 'Vestuário', 257, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358447130_004', '#E91E63', true, 4, '2025-11-05T16:00:47.000Z', '2025-11-05T16:00:47.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358447328_d2fz0', 'Posto de Combustível Shell', 'Combustível', 258, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358447130_005', '#FFC107', true, 4, '2025-11-05T16:00:47.000Z', '2025-11-05T16:00:47.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358472262_yxkx0', 'Restaurante Sabor', 'Restaurante', 259, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358472049_001', '#2196F3', true, 4, '2025-11-05T16:01:12.000Z', '2025-11-05T16:01:12.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358472299_hcdpq', 'Supermercado Bom Preço', 'Supermercado', 260, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358472049_002', '#4CAF50', true, 4, '2025-11-05T16:01:12.000Z', '2025-11-05T16:01:12.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358472310_j3l39', 'Farmácia Saúde', 'Farmácia', 261, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358472049_003', '#228B22', true, 4, '2025-11-05T16:01:12.000Z', '2025-11-05T16:01:12.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358472322_a8kwi', 'Loja de Roupas Fashion', 'Vestuário', 262, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358472049_004', '#E91E63', true, 4, '2025-11-05T16:01:12.000Z', '2025-11-05T16:01:12.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358472336_3k3h0', 'Posto de Combustível Shell', 'Combustível', 263, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358472049_005', '#FFC107', true, 4, '2025-11-05T16:01:12.000Z', '2025-11-05T16:01:12.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358491579_2tmr2', 'Restaurante Sabor', 'Restaurante', 264, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358491301_001', '#2196F3', true, 4, '2025-11-05T16:01:31.000Z', '2025-11-05T16:01:31.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358491613_9obxy', 'Supermercado Bom Preço', 'Supermercado', 265, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358491301_002', '#4CAF50', true, 4, '2025-11-05T16:01:31.000Z', '2025-11-05T16:01:31.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358491631_s6bvl', 'Farmácia Saúde', 'Farmácia', 266, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358491301_003', '#228B22', true, 4, '2025-11-05T16:01:31.000Z', '2025-11-05T16:01:31.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358491645_hyq2b', 'Loja de Roupas Fashion', 'Vestuário', 267, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358491301_004', '#E91E63', true, 4, '2025-11-05T16:01:31.000Z', '2025-11-05T16:01:31.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358491659_z4pfi', 'Posto de Combustível Shell', 'Combustível', 268, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358491301_005', '#FFC107', true, 4, '2025-11-05T16:01:31.000Z', '2025-11-05T16:01:31.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358760206_f67jk', 'Restaurante Sabor', 'Restaurante', 269, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762358759778_001', '#2196F3', true, 4, '2025-11-05T16:06:00.000Z', '2025-11-05T16:06:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358760229_aqdvc', 'Supermercado Bom Preço', 'Supermercado', 270, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762358759778_002', '#4CAF50', true, 4, '2025-11-05T16:06:00.000Z', '2025-11-05T16:06:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358760240_m461b', 'Farmácia Saúde', 'Farmácia', 271, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762358759778_003', '#228B22', true, 4, '2025-11-05T16:06:00.000Z', '2025-11-05T16:06:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358760261_cqla1', 'Loja de Roupas Fashion', 'Vestuário', 272, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762358759778_004', '#E91E63', true, 4, '2025-11-05T16:06:00.000Z', '2025-11-05T16:06:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762358760270_pthbx', 'Posto de Combustível Shell', 'Combustível', 273, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762358759778_005', '#FFC107', true, 4, '2025-11-05T16:06:00.000Z', '2025-11-05T16:06:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363060937_12iu6', 'Restaurante Sabor', 'Restaurante', 274, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363060792_001', '#2196F3', true, 4, '2025-11-05T17:17:40.000Z', '2025-11-05T17:17:40.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363060971_b1yhz', 'Supermercado Bom Preço', 'Supermercado', 275, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363060792_002', '#4CAF50', true, 4, '2025-11-05T17:17:40.000Z', '2025-11-05T17:17:40.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363060984_2nh48', 'Farmácia Saúde', 'Farmácia', 276, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363060792_003', '#228B22', true, 4, '2025-11-05T17:17:40.000Z', '2025-11-05T17:17:40.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363060999_sco32', 'Loja de Roupas Fashion', 'Vestuário', 277, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363060792_004', '#E91E63', true, 4, '2025-11-05T17:17:40.000Z', '2025-11-05T17:17:40.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363061015_mzrm9', 'Posto de Combustível Shell', 'Combustível', 278, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363060792_005', '#FFC107', true, 4, '2025-11-05T17:17:41.000Z', '2025-11-05T17:17:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363104291_2znha', 'Restaurante Sabor', 'Restaurante', 279, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363103933_001', '#2196F3', true, 4, '2025-11-05T17:18:24.000Z', '2025-11-05T17:18:24.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363104441_gex34', 'Supermercado Bom Preço', 'Supermercado', 280, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363103933_002', '#4CAF50', true, 4, '2025-11-05T17:18:24.000Z', '2025-11-05T17:18:24.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363104461_ox2c8', 'Farmácia Saúde', 'Farmácia', 281, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363103933_003', '#228B22', true, 4, '2025-11-05T17:18:24.000Z', '2025-11-05T17:18:24.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363104472_ddrhx', 'Loja de Roupas Fashion', 'Vestuário', 282, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363103933_004', '#E91E63', true, 4, '2025-11-05T17:18:24.000Z', '2025-11-05T17:18:24.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363104482_f7b2i', 'Posto de Combustível Shell', 'Combustível', 283, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363103933_005', '#FFC107', true, 4, '2025-11-05T17:18:24.000Z', '2025-11-05T17:18:24.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363181139_2e5sw', 'Restaurante Sabor', 'Restaurante', 284, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363180705_001', '#2196F3', true, 4, '2025-11-05T17:19:41.000Z', '2025-11-05T17:19:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363181467_emqsc', 'Supermercado Bom Preço', 'Supermercado', 285, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363180705_002', '#4CAF50', true, 4, '2025-11-05T17:19:41.000Z', '2025-11-05T17:19:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363181524_xhkrj', 'Farmácia Saúde', 'Farmácia', 286, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363180705_003', '#228B22', true, 4, '2025-11-05T17:19:41.000Z', '2025-11-05T17:19:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363181562_o0zht', 'Loja de Roupas Fashion', 'Vestuário', 287, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363180705_004', '#E91E63', true, 4, '2025-11-05T17:19:41.000Z', '2025-11-05T17:19:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363181762_v7bei', 'Posto de Combustível Shell', 'Combustível', 288, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363180705_005', '#FFC107', true, 4, '2025-11-05T17:19:41.000Z', '2025-11-05T17:19:41.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363260387_c10bz', 'Restaurante Sabor', 'Restaurante', 289, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363260169_001', '#2196F3', true, 4, '2025-11-05T17:21:00.000Z', '2025-11-05T17:21:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363260426_ihndw', 'Supermercado Bom Preço', 'Supermercado', 290, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363260169_002', '#4CAF50', true, 4, '2025-11-05T17:21:00.000Z', '2025-11-05T17:21:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363260443_obefa', 'Farmácia Saúde', 'Farmácia', 291, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363260169_003', '#228B22', true, 4, '2025-11-05T17:21:00.000Z', '2025-11-05T17:21:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363260460_bpisn', 'Loja de Roupas Fashion', 'Vestuário', 292, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363260169_004', '#E91E63', true, 4, '2025-11-05T17:21:00.000Z', '2025-11-05T17:21:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363260479_g7drn', 'Posto de Combustível Shell', 'Combustível', 293, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363260169_005', '#FFC107', true, 4, '2025-11-05T17:21:00.000Z', '2025-11-05T17:21:00.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363283413_cny8j', 'Restaurante Sabor', 'Restaurante', 294, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363283179_001', '#2196F3', true, 4, '2025-11-05T17:21:23.000Z', '2025-11-05T17:21:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363283459_u1w9s', 'Supermercado Bom Preço', 'Supermercado', 295, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363283179_002', '#4CAF50', true, 4, '2025-11-05T17:21:23.000Z', '2025-11-05T17:21:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363283485_j2vbf', 'Farmácia Saúde', 'Farmácia', 296, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363283179_003', '#228B22', true, 4, '2025-11-05T17:21:23.000Z', '2025-11-05T17:21:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363283509_fzuyz', 'Loja de Roupas Fashion', 'Vestuário', 297, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363283179_004', '#E91E63', true, 4, '2025-11-05T17:21:23.000Z', '2025-11-05T17:21:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363283534_1z7vw', 'Posto de Combustível Shell', 'Combustível', 298, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363283179_005', '#FFC107', true, 4, '2025-11-05T17:21:23.000Z', '2025-11-05T17:21:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363715976_89uhk', 'Restaurante Sabor', 'Restaurante', 299, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363715860_001', '#2196F3', true, 4, '2025-11-05T17:28:35.000Z', '2025-11-05T17:28:35.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363716025_6hx9b', 'Supermercado Bom Preço', 'Supermercado', 300, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363715860_002', '#4CAF50', true, 4, '2025-11-05T17:28:36.000Z', '2025-11-05T17:28:36.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363716046_m9x3h', 'Farmácia Saúde', 'Farmácia', 301, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363715860_003', '#228B22', true, 4, '2025-11-05T17:28:36.000Z', '2025-11-05T17:28:36.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363716068_ux2pw', 'Loja de Roupas Fashion', 'Vestuário', 302, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363715860_004', '#E91E63', true, 4, '2025-11-05T17:28:36.000Z', '2025-11-05T17:28:36.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363716090_y88i4', 'Posto de Combustível Shell', 'Combustível', 303, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363715860_005', '#FFC107', true, 4, '2025-11-05T17:28:36.000Z', '2025-11-05T17:28:36.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363733917_qvoco', 'Restaurante Sabor', 'Restaurante', 304, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363733687_001', '#2196F3', true, 4, '2025-11-05T17:28:53.000Z', '2025-11-05T17:28:53.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363733956_35dn9', 'Supermercado Bom Preço', 'Supermercado', 305, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363733687_002', '#4CAF50', true, 4, '2025-11-05T17:28:53.000Z', '2025-11-05T17:28:53.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363733978_wbloj', 'Farmácia Saúde', 'Farmácia', 306, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363733687_003', '#228B22', true, 4, '2025-11-05T17:28:53.000Z', '2025-11-05T17:28:53.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363733996_jsfnh', 'Loja de Roupas Fashion', 'Vestuário', 307, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363733687_004', '#E91E63', true, 4, '2025-11-05T17:28:53.000Z', '2025-11-05T17:28:53.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363734017_v1v5y', 'Posto de Combustível Shell', 'Combustível', 308, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363733687_005', '#FFC107', true, 4, '2025-11-05T17:28:54.000Z', '2025-11-05T17:28:54.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363765051_ko6dl', 'Restaurante Sabor', 'Restaurante', 309, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762363764838_001', '#2196F3', true, 4, '2025-11-05T17:29:25.000Z', '2025-11-05T17:29:25.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363765082_dh76r', 'Supermercado Bom Preço', 'Supermercado', 310, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762363764838_002', '#4CAF50', true, 4, '2025-11-05T17:29:25.000Z', '2025-11-05T17:29:25.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363765098_rycmm', 'Farmácia Saúde', 'Farmácia', 311, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762363764838_003', '#228B22', true, 4, '2025-11-05T17:29:25.000Z', '2025-11-05T17:29:25.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363765110_1cfnb', 'Loja de Roupas Fashion', 'Vestuário', 312, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762363764838_004', '#E91E63', true, 4, '2025-11-05T17:29:25.000Z', '2025-11-05T17:29:25.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762363765125_rhscl', 'Posto de Combustível Shell', 'Combustível', 313, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762363764838_005', '#FFC107', true, 4, '2025-11-05T17:29:25.000Z', '2025-11-05T17:29:25.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762364299600_9erp5', 'Restaurante Sabor', 'Restaurante', 314, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'QR_REST_1762364299401_001', '#2196F3', true, 4, '2025-11-05T17:38:19.000Z', '2025-11-05T17:38:19.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762364299654_o088u', 'Supermercado Bom Preço', 'Supermercado', 315, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'QR_SHOP_1762364299401_002', '#4CAF50', true, 4, '2025-11-05T17:38:19.000Z', '2025-11-05T17:38:19.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762364299676_kpyp3', 'Farmácia Saúde', 'Farmácia', 316, 'Rua da Saúde, 555 - Maputo', '+258841234568', 'info@farmaciasaude.co.mz', 'QR_PHARM_1762364299401_003', '#228B22', true, 4, '2025-11-05T17:38:19.000Z', '2025-11-05T17:38:19.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762364299697_l5esb', 'Loja de Roupas Fashion', 'Vestuário', 317, 'Avenida Julius Nyerere, 456 - Maputo', '+258841234569', 'vendas@fashion.co.mz', 'QR_FASHION_1762364299401_004', '#E91E63', true, 4, '2025-11-05T17:38:19.000Z', '2025-11-05T17:38:19.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at)
VALUES ('EST_1762364299725_yicdr', 'Posto de Combustível Shell', 'Combustível', 318, 'Estrada Nacional 1, Km 5 - Maputo', '+258841234570', 'shell@shell.co.mz', 'QR_SHELL_1762364299401_005', '#FFC107', true, 4, '2025-11-05T17:38:19.000Z', '2025-11-05T17:38:19.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at, image_secondary)
VALUES ('EST_1762494973761_w5f7v', 'Test test test', 'Loja', 'http://localhost:8000/api/uploads/Picture1.png-mhpgxrjh.png', 320, 'Bairro do Zimpeto', '842345740', 'tinad@gmail.com', 'MAKTUBIA_LOJA_320_1A44C029', '#4CAF50', true, 2, '2025-11-07T05:56:13.000Z', '2025-11-07T23:10:23.000Z', 'http://localhost:8000/api/uploads/Captura_de_tela_2023-08-14_072008.png-mhpgxrjj.png')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    image_secondary = EXCLUDED.image_secondary;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_by, created_at, updated_at, image_secondary)
VALUES ('EST_1762556814134_k4wuf', 'Padaria Alberto', 'Loja', '/api/uploads/banner-clube-de-petroleo-3.jpg-mhpgthmh.jpg', 321, 'Bairro do Zimpeto', '863569800', 'pdz@marcohama.com', 'MAKTUBIA_LOJA_321_4A5CE875', '#4CAF50', true, 2, '2025-11-07T23:06:54.000Z', '2025-11-07T23:06:54.000Z', '/api/uploads/VivoEnergy_Logo.jpg-mhpgthoq.jpg')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by,
    updated_at = EXCLUDED.updated_at,
    image_secondary = EXCLUDED.image_secondary;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_CAFE_001', 'Café Aroma', 'Restaurante', 'assets/images/2.jpeg', 87, 'Rua do Café, 789 - Maputo', '+258843456789', 'contato@cafearoma.co.mz', 'MAKTUBIA_CAFE_001', '#9C27B0', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_CAFE_002', 'Café Expresso', 'Restaurante', 'assets/images/3.jpeg', 98, 'Rua Comercial, 567 - Maputo', '+258845678901', 'contato@cafeexpresso.co.mz', 'MAKTUBIA_CAFE_002', '#795548', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_CENTRAL_001', 'Loja Popular', 'Loja', 'assets/images/loja3.jpeg', 92, 'Mercado Central, Box 25 - Maputo', '+258848901234', 'contato@lojapopular.co.mz', 'MAKTUBIA_CENTRAL_001', '#00BCD4', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_PREMIUM_001', 'Loja Elegance', 'Loja', 'assets/images/loja2.jpeg', 91, 'Shopping Center, Loja 15 - Maputo', '+258847890123', 'vendas@lojaelegance.co.mz', 'MAKTUBIA_PREMIUM_001', '#FF9800', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_001', 'Restaurante Sabor', 'Restaurante', 'assets/images/1.jpeg', 85, 'Rua das Flores, 123 - Maputo', '+258841234567', 'contato@restaurantesabor.co.mz', 'MAKTUBIA_REST_001', '#2196F3', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:22.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_002', 'Restaurante Delícia', 'Restaurante', 'assets/images/3.jpeg', 86, 'Avenida Principal, 456 - Maputo', '+258842345678', 'info@restaurantedelicia.co.mz', 'MAKTUBIA_REST_002', '#E91E63', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:22.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_003', 'Pizzaria Italiana', 'Restaurante', 'assets/images/4.jpeg', 88, 'Shopping Center, Loja 12 - Maputo', '+258844567890', 'pedidos@pizzariaitaliana.co.mz', 'MAKTUBIA_REST_003', '#FF5722', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_004', 'Restaurante do Mar', 'Restaurante', 'assets/images/download.jpeg', 89, 'Marginal, 789 - Maputo', '+258845678901', 'reservas@restaurantemar.co.mz', 'MAKTUBIA_REST_004', '#00BCD4', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_005', 'Churrascaria Gaúcha', 'Restaurante', 'assets/images/1.jpeg', 96, 'Avenida Brasil, 789 - Maputo', '+258843456789', 'reservas@churrascariagaucha.co.mz', 'MAKTUBIA_REST_005', '#D32F2F', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_REST_006', 'Sushi House', 'Restaurante', 'assets/images/2.jpeg', 97, 'Rua do Oceano, 234 - Maputo', '+258844567890', 'pedidos@sushihouse.co.mz', 'MAKTUBIA_REST_006', '#1976D2', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_001', 'Loja Central', 'Loja', 'assets/images/loja1.jpeg', 90, 'Avenida Principal, 456 - Maputo', '+258846789012', 'info@lojacentral.co.mz', 'MAKTUBIA_SHOP_001', '#4CAF50', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_002', 'Supermercado Bom Preço', 'Loja', 'assets/images/loja1.jpeg', 93, 'Avenida da Paz, 321 - Maputo', '+258849012345', 'clientes@bompreco.co.mz', 'MAKTUBIA_SHOP_002', '#4CAF50', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_003', 'Farmácia Saúde', 'Loja', 'assets/images/loja2.jpeg', 94, 'Rua da Saúde, 555 - Maputo', '+258841234567', 'info@farmaciasaude.co.mz', 'MAKTUBIA_SHOP_003', '#228B22', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_004', 'Loja de Eletrônicos Tech', 'Loja', 'assets/images/loja3.jpeg', 95, 'Shopping Center, Loja 45 - Maputo', '+258842345678', 'vendas@tech.co.mz', 'MAKTUBIA_SHOP_004', '#3F51B5', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_005', 'Livraria Cultura', 'Loja', 'assets/images/loja1.jpeg', 99, 'Shopping Center, Loja 88 - Maputo', '+258846789012', 'contato@livrariacultura.co.mz', 'MAKTUBIA_SHOP_005', '#7B1FA2', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_006', 'Loja de Roupas Fashion', 'Loja', 'assets/images/loja2.jpeg', 100, 'Rua da Moda, 123 - Maputo', '+258847890123', 'vendas@fashion.co.mz', 'MAKTUBIA_SHOP_006', '#E91E63', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_007', 'Pet Shop Amigo', 'Loja', 'assets/images/loja3.jpeg', 101, 'Avenida dos Animais, 456 - Maputo', '+258848901234', 'info@petshopamigo.co.mz', 'MAKTUBIA_SHOP_007', '#FF9800', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_008', 'Padaria Pão Quente', 'Loja', 'assets/images/4.jpeg', 102, 'Rua do Pão, 789 - Maputo', '+258849012345', 'contato@paoquente.co.mz', 'MAKTUBIA_SHOP_008', '#FFC107', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at)
VALUES ('MAKTUBIA_SHOP_009', 'Loja de Construção Material', 'Loja', 'assets/images/loja1.jpeg', 103, 'Avenida Industrial, 234 - Maputo', '+258841234567', 'vendas@materialconstrucao.co.mz', 'MAKTUBIA_SHOP_009', '#607D8B', true, '2025-10-31T13:27:11.000Z', '2025-10-31T13:28:23.000Z')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at;

INSERT INTO establishments (est_id, name, type, image_url, establishment_id, address, phone, email, qr_code, color, is_active, created_at, updated_at, image_secondary)
VALUES ('MAKTUBIA_SHOP_010', 'Academia Fitnes', 'Loja', '/api/uploads/VivoEnergy_Logo.jpg-mhgm9oez.jpg', 104, 'Avenida do Esporte, 567 - Maputo', '+258842345678', 'matriculas@fitness.co.mz', 'MAKTUBIA_SHOP_010', '#F44336', true, '2025-10-31T13:27:11.000Z', '2025-11-02T17:44:39.000Z', '/api/uploads/banner-clube-de-petroleo-3.jpg-mhgmd0s8.jpg')
ON CONFLICT (est_id) DO UPDATE SET
    name = EXCLUDED.name,
    type = EXCLUDED.type,
    image_url = EXCLUDED.image_url,
    establishment_id = EXCLUDED.establishment_id,
    address = EXCLUDED.address,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    qr_code = EXCLUDED.qr_code,
    color = EXCLUDED.color,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    image_secondary = EXCLUDED.image_secondary;

-- Merchants (37 registros)
INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (36, 2, 85, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (37, 2, 86, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (38, 2, 87, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (39, 2, 88, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (40, 2, 89, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (41, 2, 90, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (42, 2, 91, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (43, 2, 92, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (44, 2, 93, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (45, 2, 94, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (46, 2, 95, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (47, 2, 96, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (48, 2, 97, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (49, 2, 98, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (50, 2, 99, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (51, 2, 100, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (52, 2, 101, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (53, 2, 102, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (54, 2, 103, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (55, 2, 104, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (56, 2, 208, false, false, true, '2025-11-05T17:39:00.299Z', '2025-11-05T17:39:00.299Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color, owner_id)
VALUES (125, 17, 85, true, true, true, '2025-11-05T20:01:58.567Z', '2025-11-06T12:18:25.328Z', '#601a29', 17)
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color,
    owner_id = EXCLUDED.owner_id;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (126, 2, 319, false, false, true, '2025-11-07T05:51:08.931Z', '2025-11-07T05:51:08.931Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (127, 2, 320, false, false, true, '2025-11-07T05:56:13.796Z', '2025-11-07T05:56:13.796Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, color)
VALUES (128, 2, 321, false, false, true, '2025-11-07T23:06:54.167Z', '2025-11-07T23:06:54.167Z', '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (129, 19, 321, true, false, true, '2025-11-08T07:40:12.797Z', '2025-11-08T07:40:12.797Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (130, 17, 321, true, false, true, '2025-11-08T09:37:34.511Z', '2025-11-08T09:37:34.511Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (131, 18, 321, true, false, true, '2025-11-08T09:39:02.037Z', '2025-11-08T09:39:02.037Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (133, 19, 318, true, false, true, '2025-11-08T09:57:56.585Z', '2025-11-08T09:57:56.585Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (134, 20, 321, true, false, true, '2025-11-08T13:50:05.246Z', '2025-11-08T13:50:05.246Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (135, 17, 314, false, false, true, '2025-11-08T14:18:10.023Z', '2025-11-08T14:18:10.023Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (136, 19, 320, false, false, true, '2025-11-08T14:37:30.886Z', '2025-11-08T14:37:30.886Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (137, 19, 316, false, false, true, '2025-11-27T19:35:52.992Z', '2025-11-27T19:35:52.992Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (138, 19, 314, false, false, true, '2025-11-27T19:36:22.659Z', '2025-11-27T19:36:22.659Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (139, 19, 315, false, false, true, '2025-11-27T19:38:26.087Z', '2025-11-27T19:38:26.087Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (140, 19, 312, false, false, true, '2025-11-27T19:40:23.635Z', '2025-11-27T19:40:23.635Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

INSERT INTO merchants (merchant_id, user_id, establishment_id, can_create_campaigns, can_set_custom_points, is_active, created_at, updated_at, created_by, color)
VALUES (141, 19, 311, false, false, true, '2025-11-27T19:41:58.858Z', '2025-11-27T19:41:58.858Z', 2, '#601a29')
ON CONFLICT (merchant_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_set_custom_points = EXCLUDED.can_set_custom_points,
    is_active = EXCLUDED.is_active,
    updated_at = EXCLUDED.updated_at,
    created_by = EXCLUDED.created_by,
    color = EXCLUDED.color;

-- Merchant Users (13 registros)
INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (50, 125, 17, true, true, true, true, true, '2025-11-06T12:18:25.358Z', 17)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (51, 133, 19, false, false, false, true, true, '2025-11-08T09:57:56.585Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (52, 131, 18, true, false, false, true, true, '2025-11-08T09:58:33.702Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (53, 129, 19, true, false, false, true, true, '2025-11-08T10:25:56.990Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (54, 130, 17, true, false, false, true, true, '2025-11-08T10:26:42.855Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (55, 134, 20, true, false, false, true, true, '2025-11-08T13:50:05.246Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (56, 135, 17, false, false, false, true, true, '2025-11-08T14:18:10.023Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (57, 136, 19, false, false, false, true, true, '2025-11-08T14:37:30.886Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (58, 137, 19, false, false, false, true, true, '2025-11-27T19:35:52.992Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (59, 138, 19, false, false, false, true, true, '2025-11-27T19:36:22.659Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (60, 139, 19, false, false, false, true, true, '2025-11-27T19:38:26.087Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (61, 140, 19, false, false, false, true, true, '2025-11-27T19:40:23.635Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

INSERT INTO merchant_users (merchant_user_id, merchant_id, user_id, can_create_campaigns, can_manage_merchant, can_manage_users, can_view_reports, is_active, created_at, created_by)
VALUES (62, 141, 19, false, false, false, true, true, '2025-11-27T19:41:58.858Z', 2)
ON CONFLICT (merchant_user_id) DO UPDATE SET
    merchant_id = EXCLUDED.merchant_id,
    user_id = EXCLUDED.user_id,
    can_create_campaigns = EXCLUDED.can_create_campaigns,
    can_manage_merchant = EXCLUDED.can_manage_merchant,
    can_manage_users = EXCLUDED.can_manage_users,
    can_view_reports = EXCLUDED.can_view_reports,
    is_active = EXCLUDED.is_active,
    created_by = EXCLUDED.created_by;

-- Campaigns (69 registros)
INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('01422f48-2592-4b26-9d1b-f030ff7f1fe7', 'EST_1762363765098_rycmm', 'points_per_spend', 'Ganhe pontos em medicamentos', '0.1500', '100.00', true, '1.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/460964488_425640160544155_133796723133913064_n.jpg-m9ixfu73.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('08209ef0-3aa4-4e04-941e-98e05c84e356', 'EST_1762363765082_dh76r', 'points_per_spend', 'Campanha encerrada - Não disponível', '0.2000', '50.00', false, '1.50', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000140080.jpg-mbc3ga35.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_stock, reward_stock_redeemed, status, accumulation_rate, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('0c655d6a-a694-4352-8bc1-cb7dfad72f17', 'EST_1762364299654_o088u', 'RewardType_Auto', 'tttt', '2025-11-12T22:00:00.000Z', false, '1.00', '2025-11-09T16:54:16.467Z', 'CAMP-20251109-0002', 'tttt', 'ttttt', 1000, 0, '2025-11-09T22:00:00.000Z', '0.00', 0, 0, 'Rascunho', '0.0100', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_0C655D6A_A4F7E089', '/api/uploads/Isctem-logo__1_.png-mhrydzni.png', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    accumulation_rate = EXCLUDED.accumulation_rate,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('0de242ae-f372-42f6-b16f-18b2854ee531', 'EST_1762364299676_kpyp3', 'points_per_spend', 'Campanha temporária suspensa', '0.1500', '80.00', false, '1.80', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('1090ce8d-1a12-4cbc-a1c1-299961106031', 'EST_1762363765051_ko6dl', 'points_per_spend', 'Campanha especial de fim de mês - Ganhe 3x pontos', '0.2000', '100.00', true, '3.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('13e38efc-5540-4b29-a8bd-86b232560513', 'EST_1762364299697_l5esb', 'points_per_spend', 'Bônus de 50 pontos em compras acima de 200 MZN', '0.2000', '200.00', true, '1.50', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000140080.jpg-mbc3ga35.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('1ad8d2ba-b897-4722-8ab9-ff2b5fe14080', 'EST_1762364299676_kpyp3', 'points_per_spend', 'Campanha especial de fim de mês - Ganhe 3x pontos', '0.2000', '100.00', true, '3.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000137604.jpg-mb60xavr.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('1df42f6b-88ee-431c-b0f9-053ebfab6212', 'EST_1762364299725_yicdr', 'RewardType_Quiz', 'Promocao de Oleo', '2025-11-11T22:00:00.000Z', true, '1.00', '2025-11-10T20:04:39.282Z', 'CAMP-20251110-0001', 'Oleo de graca', 'GALP', 2000, 0, '2025-11-10T22:00:00.000Z', '0.00', 0, 0, 'Activo', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_1DF42F6B_A9BE2390', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('37fa3573-c018-454e-8efe-a2ce5b1e9b5f', 'EST_1762363765098_rycmm', 'points_per_spend', 'Campanha temporária suspensa', '0.1500', '80.00', false, '1.80', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000022.jpg-mbf7gtsn.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('3863cf45-5aab-412f-a738-66ee09748827', 'EST_1762363765098_rycmm', 'points_per_spend', 'Campanha especial de fim de mês - Ganhe 3x pontos', '0.2000', '100.00', true, '3.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('41589525-4bdc-4f7c-be30-56b6545f74d8', 'EST_1762364299600_9erp5', 'points_per_spend', 'Campanha especial de fim de mês - Ganhe 3x pontos', '0.2000', '100.00', true, '3.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000140080.jpg-mbc3ga35.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, campaign_number, campaign_name, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, accumulation_rate, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('4cb9d931-8701-41cb-8a0a-1f8c6fb47dfa', 'MAKTUBIA_REST_001', 'points_accumulation', 'Ganhe pontos em cada compra - 10% de retorno', '0.1000', '50.00', true, '1.00', '2025-11-06T12:23:02.534Z', 'CAMP-1762431782610-678', 'Pontos em Compras', 0, '0.00', 0, 0, 'Rascunho', '0.1000', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    accumulation_rate = EXCLUDED.accumulation_rate,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('4f6d963e-4808-4f1c-a0a1-d7180eb81c93', 'EST_1762363765082_dh76r', 'points_per_spend', '1 ponto a cada 5 MZN gastos', '0.2000', '25.00', true, '1.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('520dd742-4e72-4103-bd4a-ecc448003922', 'EST_1762364299654_o088u', 'points_per_spend', 'Black Friday - 4x pontos em compras acima de 300 MZN', '0.2000', '300.00', true, '4.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg', '["/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg","/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg","/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('566cd3aa-0989-44a4-a327-d6e1d71e368b', 'EST_1762364299697_l5esb', 'points', 'sdfsdf', '2025-11-20T00:00:00.000Z', false, '1.00', '2025-11-06T19:55:06.607Z', 'CAMP-20251106-0001', 'sdfsdf', 'sfdsdf', 100000, 0, '2025-11-07T00:00:00.000Z', '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg', '["/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg","/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg","/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, campaign_number, campaign_name, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, accumulation_rate, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('56ce43ef-fa8e-45da-811a-287756469cd1', 'MAKTUBIA_REST_001', 'points_accumulation', 'Promoção especial - Ganhe 20% de pontos', '0.2000', '100.00', true, '1.50', '2025-11-06T12:23:02.534Z', 'CAMP-1762431782615-535', 'Promoção Especial', 0, '0.00', 0, 0, 'Rascunho', '0.2000', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    accumulation_rate = EXCLUDED.accumulation_rate,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('588541a6-981b-4804-8e50-eb7f03bac2aa', 'EST_1762363765051_ko6dl', 'points_per_spend', 'Promoção de aniversário - Bônus de 100 pontos', '0.2000', '150.00', true, '2.50', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('5e1c1f23-7500-4a61-a935-7550cb2f6698', 'EST_1762364299600_9erp5', 'points_per_spend', 'Campanha encerrada - Não disponível', '0.2000', '50.00', false, '1.50', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000024.jpg-mbclnlu3.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('66c4b57d-f6d0-43a8-8e38-d52941d3db45', 'EST_1762358491579_2tmr2', 'points_per_spend', 'Ganhe 2x pontos em todas as compras', '0.2000', '50.00', true, '2.00', '2025-11-05T16:01:31.148Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('67bc4cc9-afe1-450c-a99d-f06a2c05f591', 'EST_1762364299600_9erp5', 'points_per_spend', 'Promoção de aniversário - Bônus de 100 pontos', '0.2000', '150.00', true, '2.50', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000022.jpg-mbf7gtsn.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('6802e7dd-b50b-4a9e-bdbc-2e29a2a17e09', 'EST_1762364299600_9erp5', 'points_per_spend', 'Ganhe 2x pontos em todas as compras', '0.2000', '50.00', true, '2.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg', '["/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg","/api/uploads/460964488_425640160544155_133796723133913064_n.jpg-m9ixfu73.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, points_accumulated, valid_from, reward_description, reward_value_mt, reward_points_cost, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('6b6cf44c-4a0b-4480-9cd4-6442d55f0161', 'EST_1762363765098_rycmm', 'RewardType_Auto', 'Sorteio', '2025-11-19T22:00:00.000Z', true, '1.00', '2025-11-09T17:50:33.882Z', 'CAMP-20251109-0003', 'Campanha Sorteio', 'Hama', 0, '2025-11-08T22:00:00.000Z', 'Sorteio', '0.00', 1, 0, 0, 'Activo', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_6B6CF44C_E44AE15E', '/api/uploads/Captura_de_tela_2023-08-14_072008.png-mhs0edic.png', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_description = EXCLUDED.reward_description,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_points_cost = EXCLUDED.reward_points_cost,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('7511383c-e06c-42d7-a553-fa750e2ba793', 'EST_1762363765051_ko6dl', 'points_per_spend', 'Ganhe 2x pontos em todas as compras', '0.2000', '50.00', true, '2.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('7548e357-dbc9-4346-9500-41a6d7c48987', 'EST_1762494973761_w5f7v', 'points', 'Test', '2025-11-18T00:00:00.000Z', true, '1.00', '2025-11-08T14:38:27.318Z', 'CAMP-20251108-0001', 'Test', 'Joao Loureco', 100, 0, '2025-11-08T00:00:00.000Z', '0.00', 0, 0, 'Activo', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg', '["/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg","/api/uploads/460964488_425640160544155_133796723133913064_n.jpg-m9ixfu73.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('77c69a0d-cb0e-4c5a-8406-7a2193be9478', 'EST_1762358760270_pthbx', 'points_per_spend', 'Triplo de pontos nos fins de semana', '0.2000', '30.00', true, '3.00', '2025-11-05T16:05:59.709Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('7e4b58fa-0a7e-4d01-92c6-3bfb576ee95d', 'EST_1762364299676_kpyp3', 'points_per_spend', 'Ganhe pontos em medicamentos', '0.1500', '100.00', true, '1.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg', '["/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg","/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg","/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, campaign_number, campaign_name, points_accumulated, reward_value_mt, reward_points_cost, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('800b7c9c-8cd5-45d2-94d6-de55d052458d', 'MAKTUBIA_REST_001', 'reward_redemption', 'Resgate pontos por recompensas', '0.1000', '0.00', true, '1.00', '2025-11-06T12:23:02.534Z', 'CAMP-1762431782618-811', 'Resgate de Recompensas', 0, '10.00', 100, 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_points_cost = EXCLUDED.reward_points_cost,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('82f9bec6-9b88-44d6-b080-b0a85f04a553', 'EST_1762358760261_cqla1', 'points_per_spend', 'Bônus de 50 pontos em compras acima de 200 MZN', '0.2000', '200.00', true, '1.50', '2025-11-05T16:05:59.709Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_points_cost, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('89970066-a92f-4f67-9731-282438d3c39b', 'EST_1762364299725_yicdr', 'RewardType_Auto', 'Campanha para arecadacao de fundos', '2025-11-21T00:00:00.000Z', true, '1.00', '2025-11-09T10:17:33.538Z', 'CAMP-20251109-0001', 'campanha de teste', 'Antonio Belo', 1500, 0, '2025-11-10T00:00:00.000Z', '0.00', 5, 0, 0, 'Activo', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_89970066_FF679024', '/api/uploads/VivoEnergy_Logo.jpg-mhrk7t31.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_points_cost = EXCLUDED.reward_points_cost,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('8c40d0c0-7223-4f83-89e1-5d40a5d862d4', 'MAKTUBIA_REST_001', 'points', 'Campanha de Pontos - Ganhe 10 pontos por cada 100 MT', '0.1000', '100.00', true, '1.00', '2025-11-05T20:01:58.567Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000024.jpg-mbclnlu3.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('913c03cc-3095-4f26-9628-dd930bf565e4', 'EST_1762363765051_ko6dl', 'points_per_spend', 'Campanha encerrada - Não disponível', '0.2000', '50.00', false, '1.50', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('921ea77a-4b94-4864-a6d7-88bf82dc7476', 'EST_1762364299725_yicdr', 'points_per_spend', 'Triplo de pontos nos fins de semana', '0.2000', '30.00', true, '3.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_points_cost, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('92f83691-3eff-416c-8a80-f4b8a18df3c7', 'EST_1762364299725_yicdr', 'RewardType_Auto', 'Promocao de Oleo', '2025-11-12T22:00:00.000Z', false, '1.00', '2025-11-11T09:40:52.057Z', 'CAMP-20251111-0001', 'Promocao de Oleo', 'Nunes', 100, 0, '2025-11-10T22:00:00.000Z', '0.00', 5, 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_92F83691_326EDF23', '/api/uploads/Imagem-moderador.jpg-mhudsbp7.jpg', '["/api/uploads/Imagem-moderador.jpg-mhudsbp7.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_points_cost = EXCLUDED.reward_points_cost,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('94e4e99e-2b6e-4223-999a-d7bd32b36037', 'EST_1762363765125_rhscl', 'points_per_spend', 'Triplo de pontos nos fins de semana', '0.2000', '30.00', true, '3.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000137604.jpg-mb60xavr.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('9be65d7b-53fd-4f13-9156-e7dc527319a2', 'MAKTUBIA_REST_001', 'points', 'Campanha Especial - Ganhe 20 pontos por cada 100 MT', '0.2000', '50.00', true, '2.00', '2025-11-05T20:01:58.567Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000022.jpg-mbf7gtsn.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('aaa8d303-3c44-497b-81a8-bac69747dddd', 'EST_1762358760206_f67jk', 'points_per_spend', 'Ganhe 2x pontos em todas as compras', '0.2000', '50.00', true, '2.00', '2025-11-05T16:05:59.709Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, required_visits, created_at, campaign_number, campaign_name, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, accumulation_rate, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('ad7ccfbe-d287-4aa5-94b6-613be576efd8', 'MAKTUBIA_REST_001', 'visit_based', 'Ganhe pontos por visitas frequentes', '0.1000', '0.00', true, '1.00', 5, '2025-11-06T12:23:02.534Z', 'CAMP-1762431782622-718', 'Programa de Fidelidade', 0, '0.00', 0, 0, 'Rascunho', '0.1000', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', '["/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg","/api/uploads/1000000022.jpg-mbf7gtsn.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    required_visits = EXCLUDED.required_visits,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    accumulation_rate = EXCLUDED.accumulation_rate,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, campaign_number, campaign_name, sponsor_name, total_points_limit, points_accumulated, valid_from, reward_value_mt, reward_stock, reward_stock_redeemed, status, accumulation_rate, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, qr_code, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('c11a82e6-53a2-45bd-9673-0d8c795346c5', 'EST_1762556814134_k4wuf', 'RewardType_Auto', 'paga 5 paes e leva mais 1', '2025-11-19T22:00:00.000Z', true, '1.00', '2025-11-09T20:48:02.892Z', 'CAMP-20251109-0004', 'Promocao de pao', 'undefined', 200, 0, '2025-11-09T22:00:00.000Z', '0.00', 0, 0, 'Activo', '0.1000', false, false, false, false, false, false, '0.00', '0.00', 'MAKTUBIA_CAMP_C11A82E6_B2558ED1', '/api/uploads/617792-pao-frances_rec.jpg-mhs6qmgu.jpg', '["/api/uploads/617792-pao-frances_rec.jpg-mhs6qmgu.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    campaign_number = EXCLUDED.campaign_number,
    campaign_name = EXCLUDED.campaign_name,
    sponsor_name = EXCLUDED.sponsor_name,
    total_points_limit = EXCLUDED.total_points_limit,
    points_accumulated = EXCLUDED.points_accumulated,
    valid_from = EXCLUDED.valid_from,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    accumulation_rate = EXCLUDED.accumulation_rate,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    qr_code = EXCLUDED.qr_code,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('cae4b3ec-dc1a-421b-a586-9518fca13931', 'EST_1762358491659_z4pfi', 'points_per_spend', 'Triplo de pontos nos fins de semana', '0.2000', '30.00', true, '3.00', '2025-11-05T16:01:31.148Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_CAFE_001_1761917303013_a2f84h', 'MAKTUBIA_CAFE_001', 'points_per_spend', 'Café grátis a cada 10 compras', '0.3000', '25.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000137604.jpg-mb60xavr.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_CAFE_002_1761917303169_g64ju8', 'MAKTUBIA_CAFE_002', 'points_per_spend', 'Ganhe pontos em cada café', '0.1000', '15.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_CENTRAL_001_1761917303088_5dxn38', 'MAKTUBIA_CENTRAL_001', 'buy_get', 'Compre 2, leve 3', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000022.jpg-mbf7gtsn.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_PREMIUM_001_1761917303074_eqe4zj', 'MAKTUBIA_PREMIUM_001', 'vip_treatment', 'Compras acima de 200 MZN', '200.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_001_1761917302972_gjnku1', 'MAKTUBIA_REST_001', 'points_per_spend', 'Ganhe 2x pontos', '0.2000', '50.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_002_1761917302996_zwvypy', 'MAKTUBIA_REST_002', 'points_per_spend', '3x pontos em jantares', '0.4000', '100.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', '["/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg","/api/uploads/1000000022.jpg-mbf7gtsn.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_003_1761917303028_ie8juu', 'MAKTUBIA_REST_003', 'buy_get', 'Compre 2 pizzas grandes, ganhe 1 média', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_004_1761917303047_c7lmhp', 'MAKTUBIA_REST_004', 'vip_treatment', 'Tratamento VIP em jantares especiais', '300.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_005_1761917303147_rlyur9', 'MAKTUBIA_REST_005', 'points_per_spend', 'Rodízio com pontos duplos', '0.3000', '150.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_REST_006_1761917303159_2sozro', 'MAKTUBIA_REST_006', 'punch_card', '10 compras = 1 prato grátis', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_001_1761917303061_9brc3t', 'MAKTUBIA_SHOP_001', 'punch_card', '5 compras = 20% off', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_002_1761917303102_xw2ykt', 'MAKTUBIA_SHOP_002', 'points_per_spend', '1 ponto a cada 5 MZN gastos', '0.2000', '25.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_003_1761917303116_r6kpmm', 'MAKTUBIA_SHOP_003', 'points_per_spend', 'Ganhe pontos em medicamentos', '0.1500', '100.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg', '["/api/uploads/475787037_9111715462230466_3992637704950100247_n.jpg-m9thfwmw.jpg","/api/uploads/480171822_9192586617476683_6479871491476429191_n.jpg-m9tgkuzd.jpg","/api/uploads/485160057_9393087390759937_1117532194624037119_n.jpg-m9tfrqlo.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_004_1761917303130_8xujgt', 'MAKTUBIA_SHOP_004', 'points_per_spend', '2x pontos em produtos eletrônicos', '0.3000', '500.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000024.jpg-mbclnlu3.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_005_1761917303180_dw73r7', 'MAKTUBIA_SHOP_005', 'points_per_spend', 'Pontos em livros e material escolar', '0.2500', '50.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_006_1761917303193_etmfwn', 'MAKTUBIA_SHOP_006', 'buy_get', 'Compre 2 peças, ganhe 30% off na 3ª', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_007_1761917303205_l77yqt', 'MAKTUBIA_SHOP_007', 'points_per_spend', 'Pontos em produtos para pets', '0.2000', '40.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_008_1761917303217_u7l9e7', 'MAKTUBIA_SHOP_008', 'punch_card', '10 compras = 1 pão grátis diário por 1 mês', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_009_1761917303229_ve0cw3', 'MAKTUBIA_SHOP_009', 'points_per_spend', 'Pontos em materiais de construção', '0.1500', '200.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, min_spend, valid_until, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('CAMP_MAKTUBIA_SHOP_010_1761917303240_6xmsjf', 'MAKTUBIA_SHOP_010', 'vip_treatment', 'Assinatura anual = tratamento VIP', '1200.00', '2026-11-02T14:15:28.939Z', true, '1.00', '2025-11-02T14:11:56.507Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg', '["/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg","/api/uploads/460964488_425640160544155_133796723133913064_n.jpg-m9ixfu73.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    min_spend = EXCLUDED.min_spend,
    valid_until = EXCLUDED.valid_until,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('d7e49d0c-84e7-45ab-922c-12c266ac5e71', 'EST_1762363765082_dh76r', 'points_per_spend', 'Black Friday - 4x pontos em compras acima de 300 MZN', '0.2000', '300.00', true, '4.00', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000000024.jpg-mbclnlu3.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('d85cd834-41cd-419d-88bd-0a317d856ff1', 'EST_1762358491645_hyq2b', 'points_per_spend', 'Bônus de 50 pontos em compras acima de 200 MZN', '0.2000', '200.00', true, '1.50', '2025-11-05T16:01:31.148Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('daef90a7-27a6-4f10-8150-3f70eb4e2013', 'EST_1762363765110_1cfnb', 'points_per_spend', 'Bônus de 50 pontos em compras acima de 200 MZN', '0.2000', '200.00', true, '1.50', '2025-11-05T17:29:24.791Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('db6d23cc-6b0e-4e48-ad77-41ecba569d23', 'EST_1762358760229_aqdvc', 'points_per_spend', '1 ponto a cada 5 MZN gastos', '0.2000', '25.00', true, '1.00', '2025-11-05T16:05:59.709Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('e4fd96ee-ba39-48e3-adaf-990cb7f94eb3', 'MAKTUBIA_REST_001', 'points', 'Campanha Bônus - Ganhe pontos extras', '0.1500', '200.00', false, '1.50', '2025-11-05T20:01:58.567Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/1000137604.jpg-mb60xavr.jpg', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('eb0925ca-82e9-4f37-84b3-fe3233fc86d4', 'EST_1762358760240_m461b', 'points_per_spend', 'Ganhe pontos em medicamentos', '0.1500', '100.00', true, '1.00', '2025-11-05T16:05:59.709Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('f8cdce3c-630e-4a20-823e-0684149ae883', 'EST_1762358491613_9obxy', 'points_per_spend', '1 ponto a cada 5 MZN gastos', '0.2000', '25.00', true, '1.00', '2025-11-05T16:01:31.148Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('fae88485-8be5-434e-be76-eecad3c57efc', 'EST_1762358491631_s6bvl', 'points_per_spend', 'Ganhe pontos em medicamentos', '0.1500', '100.00', true, '1.00', '2025-11-05T16:01:31.148Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('fc04c38c-9fe4-450d-95ec-98961143bcac', 'EST_1762364299654_o088u', 'points_per_spend', '1 ponto a cada 5 MZN gastos', '0.2000', '25.00', true, '1.00', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg', '["/api/uploads/135752311_3643785142356886_7935461806462368027_n.jpg-m9sveugt.jpg","/api/uploads/460964488_425640160544155_133796723133913064_n.jpg-m9ixfu73.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

INSERT INTO campaigns (campaign_id, est_id, type, description, conversion_rate, min_spend, active, bonus_multiplier, created_at, points_accumulated, reward_value_mt, reward_stock, reward_stock_redeemed, status, new_customers_only, vip_only, notify_push, notify_sms, notify_email, notify_whatsapp, communication_budget, communication_credits_used, image_url, images, draw_chances_per_purchase, draw_winners_count, quiz_points_per_correct, quiz_max_attempts, referral_min_referrals, referral_points_per_referral, referral_requires_first_purchase, challenge_progress_tracking, party_points_per_vote)
VALUES ('fc4cffed-231d-46f3-a51e-9436f86472e5', 'EST_1762364299654_o088u', 'points_per_spend', 'Campanha encerrada - Não disponível', '0.2000', '50.00', false, '1.50', '2025-11-05T17:38:19.321Z', 0, '0.00', 0, 0, 'Rascunho', false, false, false, false, false, false, '0.00', '0.00', '/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg', '["/api/uploads/486277228_9423914774343865_2956277354777842672_n.jpg-m9teylag.jpg","/api/uploads/1000000022.jpg-mbf7gtsn.jpg"]', 1, 1, 10, 3, 1, 1000, true, true, 10)
ON CONFLICT (campaign_id) DO UPDATE SET
    est_id = EXCLUDED.est_id,
    type = EXCLUDED.type,
    description = EXCLUDED.description,
    conversion_rate = EXCLUDED.conversion_rate,
    min_spend = EXCLUDED.min_spend,
    active = EXCLUDED.active,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_accumulated = EXCLUDED.points_accumulated,
    reward_value_mt = EXCLUDED.reward_value_mt,
    reward_stock = EXCLUDED.reward_stock,
    reward_stock_redeemed = EXCLUDED.reward_stock_redeemed,
    status = EXCLUDED.status,
    new_customers_only = EXCLUDED.new_customers_only,
    vip_only = EXCLUDED.vip_only,
    notify_push = EXCLUDED.notify_push,
    notify_sms = EXCLUDED.notify_sms,
    notify_email = EXCLUDED.notify_email,
    notify_whatsapp = EXCLUDED.notify_whatsapp,
    communication_budget = EXCLUDED.communication_budget,
    communication_credits_used = EXCLUDED.communication_credits_used,
    image_url = EXCLUDED.image_url,
    images = EXCLUDED.images,
    draw_chances_per_purchase = EXCLUDED.draw_chances_per_purchase,
    draw_winners_count = EXCLUDED.draw_winners_count,
    quiz_points_per_correct = EXCLUDED.quiz_points_per_correct,
    quiz_max_attempts = EXCLUDED.quiz_max_attempts,
    referral_min_referrals = EXCLUDED.referral_min_referrals,
    referral_points_per_referral = EXCLUDED.referral_points_per_referral,
    referral_requires_first_purchase = EXCLUDED.referral_requires_first_purchase,
    challenge_progress_tracking = EXCLUDED.challenge_progress_tracking,
    party_points_per_vote = EXCLUDED.party_points_per_vote;

-- Purchases (77 registros)
INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (1, '4', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '150.00', '0.2000', '1.00', '30', '2025-10-31T15:52:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:20.310Z', 'confirmed', 'COMPRA_1762030820316_C67D9272', '2025-11-01T21:06:12.481Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (2, '5', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '250.00', '0.2000', '1.00', '50', '2025-10-30T13:06:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:20.364Z', 'confirmed', 'COMPRA_1762030820366_B3365201', '2025-11-01T21:06:36.136Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (3, '6', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '300.00', '0.2500', '1.00', '75', '2025-10-31T05:17:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:00:20.375Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_6_1762030820374.jpg', 'pending', 'COMPRA_1762030820376_2C8151B3', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (4, '7', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '500.00', '0.2000', '1.00', '100', '2025-10-27T03:27:00.000Z', 'Compra de exemplo - Loja Loja Popular', '2025-11-01T21:00:20.386Z', '/api/uploads/receipt_MAKTUBIA_CENTRAL_001_7_1762030820385.jpg', 'confirmed', 'COMPRA_1762030820387_661DAE90', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (5, '8', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '750.00', '0.2000', '1.00', '150', '2025-10-25T01:58:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:00:20.426Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_8_1762030820425.jpg', 'confirmed', 'COMPRA_1762030820427_B32A947B', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (6, '9', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '1200.00', '0.2000', '1.00', '240', '2025-10-22T08:17:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:20.447Z', '/api/uploads/receipt_EST_1762022401962_aqudz_9_1762030820445.jpg', 'confirmed', 'COMPRA_1762030820449_1FEE11DB', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (7, '10', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '450.00', '0.1500', '1.00', '67', '2025-10-20T15:46:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:20.477Z', 'confirmed', 'COMPRA_1762030820479_819185F4', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (8, '11', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '600.00', '0.2000', '1.00', '120', '2025-10-17T15:20:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:00:20.499Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_11_1762030820498.jpg', 'confirmed', 'COMPRA_1762030820501_573D5604', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (9, '12', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '200.00', '0.2000', '1.00', '40', '2025-10-29T06:06:00.000Z', 'Compra rejeitada: Valor não confere com o recibo', '2025-11-01T21:00:20.520Z', 'rejected', 'COMPRA_1762030820521_78250CE0', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (10, '4', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '180.00', '0.2000', '1.00', '36', '2025-11-01T07:27:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:00:20.529Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_4_1762030820528.jpg', 'confirmed', 'COMPRA_1762030820530_96440959', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (11, '5', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '320.00', '0.2500', '1.00', '80', '2025-10-30T06:00:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:20.552Z', '/api/uploads/receipt_EST_1762022401962_aqudz_5_1762030820551.jpg', 'confirmed', 'COMPRA_1762030820554_BA454F3A', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (12, '6', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '550.00', '0.2000', '1.00', '110', '2025-10-24T20:00:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:20.575Z', '/api/uploads/receipt_MAKTUBIA_CAFE_001_6_1762030820574.jpg', 'confirmed', 'COMPRA_1762030820576_5FBE0EBF', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, confirmed_by, payment_method, points_used)
VALUES (13, '4', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '150.00', '0.2000', '1.00', '30', '2025-10-31T09:23:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:47.097Z', 'rejected', 'COMPRA_1762030847103_1B407BFE', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (14, '5', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '250.00', '0.2000', '1.00', '50', '2025-10-30T15:57:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:47.134Z', 'pending', 'COMPRA_1762030847135_B0224F24', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (15, '6', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '300.00', '0.2500', '1.00', '75', '2025-10-30T23:52:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:00:47.155Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_6_1762030847153.jpg', 'pending', 'COMPRA_1762030847156_9ED95C7C', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (16, '7', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '500.00', '0.2000', '1.00', '100', '2025-10-27T18:48:00.000Z', 'Compra de exemplo - Loja Loja Popular', '2025-11-01T21:00:47.175Z', '/api/uploads/receipt_MAKTUBIA_CENTRAL_001_7_1762030847173.jpg', 'pending', 'COMPRA_1762030847175_5B44566D', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (17, '8', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '750.00', '0.2000', '1.00', '150', '2025-10-25T15:08:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:00:47.222Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_8_1762030847219.jpg', 'pending', 'COMPRA_1762030847222_0DC5E768', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (18, '9', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '1200.00', '0.2000', '1.00', '240', '2025-10-21T23:57:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:47.264Z', '/api/uploads/receipt_EST_1762022401962_aqudz_9_1762030847263.jpg', 'pending', 'COMPRA_1762030847265_5FA3C24B', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (19, '10', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '450.00', '0.1500', '1.00', '67', '2025-10-20T03:09:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:47.298Z', 'pending', 'COMPRA_1762030847299_7CC59FB2', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (20, '11', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '600.00', '0.2000', '1.00', '120', '2025-10-17T07:44:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:00:47.319Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_11_1762030847317.jpg', 'pending', 'COMPRA_1762030847319_8D6BC019', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (21, '12', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '200.00', '0.2000', '1.00', '40', '2025-10-29T04:31:00.000Z', 'Compra rejeitada: Valor não confere com o recibo', '2025-11-01T21:00:47.336Z', 'rejected', 'COMPRA_1762030847337_DF1D728E', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (22, '4', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '180.00', '0.2000', '1.00', '36', '2025-10-31T23:56:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:00:47.373Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_4_1762030847371.jpg', 'confirmed', 'COMPRA_1762030847381_94347264', '2025-11-01T21:20:31.647Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (23, '5', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '320.00', '0.2500', '1.00', '80', '2025-10-30T17:43:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:00:47.406Z', '/api/uploads/receipt_EST_1762022401962_aqudz_5_1762030847404.jpg', 'confirmed', 'COMPRA_1762030847407_E5C2A97E', '2025-11-01T21:40:21.944Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (24, '6', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '550.00', '0.2000', '1.00', '110', '2025-10-24T16:34:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:00:47.443Z', '/api/uploads/receipt_MAKTUBIA_CAFE_001_6_1762030847442.jpg', 'pending', 'COMPRA_1762030847444_38A5CE58', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (25, '4', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '150.00', '0.2000', '1.00', '30', '2025-10-31T06:58:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:01:11.650Z', 'pending', 'COMPRA_1762030871656_B4C1A4BB', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (26, '5', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '250.00', '0.2000', '1.00', '50', '2025-10-30T15:25:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:01:11.686Z', 'pending', 'COMPRA_1762030871687_163357EE', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, payment_method, points_used)
VALUES (27, '6', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '300.00', '0.2500', '1.00', '75', '2025-10-31T01:32:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:01:11.696Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_6_1762030871695.jpg', 'pending', 'COMPRA_1762030871697_17659503', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (28, '7', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '500.00', '0.2000', '1.00', '100', '2025-10-27T21:10:00.000Z', 'Compra de exemplo - Loja Loja Popular', '2025-11-01T21:01:11.707Z', '/api/uploads/receipt_MAKTUBIA_CENTRAL_001_7_1762030871705.jpg', 'confirmed', 'COMPRA_1762030871710_A286FC24', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (29, '8', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '750.00', '0.2000', '1.00', '150', '2025-10-24T22:44:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:01:11.764Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_8_1762030871763.jpg', 'confirmed', 'COMPRA_1762030871765_9A77C613', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (30, '9', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '1200.00', '0.2000', '1.00', '240', '2025-10-21T23:24:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:01:11.788Z', '/api/uploads/receipt_EST_1762022401962_aqudz_9_1762030871787.jpg', 'confirmed', 'COMPRA_1762030871789_F24A1946', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (31, '10', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '450.00', '0.1500', '1.00', '67', '2025-10-19T22:24:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:01:11.816Z', 'confirmed', 'COMPRA_1762030871817_AAA8BCF7', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (32, '11', 'MAKTUBIA_CAFE_002', 'MAKTUBIA_CAFE_002', '600.00', '0.2000', '1.00', '120', '2025-10-17T19:57:00.000Z', 'Compra de exemplo - Restaurante Café Expresso', '2025-11-01T21:01:11.839Z', '/api/uploads/receipt_MAKTUBIA_CAFE_002_11_1762030871838.jpg', 'confirmed', 'COMPRA_1762030871840_A2BF553E', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, status, purchase_code, payment_method, points_used)
VALUES (33, '12', 'MAKTUBIA_CENTRAL_001', 'MAKTUBIA_CENTRAL_001', '200.00', '0.2000', '1.00', '40', '2025-10-29T21:57:00.000Z', 'Compra rejeitada: Valor não confere com o recibo', '2025-11-01T21:01:11.861Z', 'rejected', 'COMPRA_1762030871862_AC9F24CD', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (34, '4', 'MAKTUBIA_PREMIUM_001', 'MAKTUBIA_PREMIUM_001', '180.00', '0.2000', '1.00', '36', '2025-11-01T14:09:00.000Z', 'Compra de exemplo - Loja Loja Elegance', '2025-11-01T21:01:11.873Z', '/api/uploads/receipt_MAKTUBIA_PREMIUM_001_4_1762030871871.jpg', 'confirmed', 'COMPRA_1762030871874_BB3DD8A8', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (35, '5', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '320.00', '0.2500', '1.00', '80', '2025-10-30T06:40:00.000Z', 'Compra de exemplo - Serviço Tina Daniel', '2025-11-01T21:01:11.896Z', '/api/uploads/receipt_EST_1762022401962_aqudz_5_1762030871895.jpg', 'confirmed', 'COMPRA_1762030871897_916FA12B', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (36, '6', 'MAKTUBIA_CAFE_001', 'MAKTUBIA_CAFE_001', '550.00', '0.2000', '1.00', '110', '2025-10-24T07:29:00.000Z', 'Compra de exemplo - Restaurante Café Aroma', '2025-11-01T21:01:11.919Z', '/api/uploads/receipt_MAKTUBIA_CAFE_001_6_1762030871918.jpg', 'confirmed', 'COMPRA_1762030871920_83B9703C', '2025-11-01T21:01:11.288Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (37, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '1500.00', '0.2000', '1.00', '300', '2025-11-02T14:16:16.381Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T14:16:16.383Z', '/api/uploads/receipt_photo.jpg-mhhsnu5s.jpg', 'confirmed', 'COMPRA_1762092976388_56E871CF', '2025-11-02T14:31:54.795Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (38, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '2000.00', '0.2000', '1.00', '400', '2025-11-02T14:19:27.972Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T14:19:27.973Z', '/api/uploads/receipt_photo.jpg-mhhsry1g.jpg', 'confirmed', 'COMPRA_1762093167975_F5B5D359', '2025-11-02T14:21:46.780Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (39, '2', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '1800.00', '0.2000', '1.00', '360', '2025-11-02T14:48:28.988Z', 'Compra registrada via QR code no estabelecimento Tina Daniel. Foto do recibo anexada.', '2025-11-02T14:48:28.989Z', '/api/uploads/receipt_photo.jpg-mhhtt9bx.jpg', 'confirmed', 'COMPRA_1762094908992_5F588A0A', '2025-11-02T14:50:33.951Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (40, '2', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '1500.00', '0.2000', '1.00', '300', '2025-11-02T15:06:42.699Z', 'Compra registrada via QR code no estabelecimento Tina Daniel. Foto do recibo anexada.', '2025-11-02T15:06:42.700Z', '/api/uploads/receipt_photo.jpg-mhhugpb3.jpg', 'confirmed', 'COMPRA_1762096002702_03CCEF1B', '2025-11-02T15:07:03.574Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (41, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '2100.00', '0.2000', '1.00', '420', '2025-11-02T15:20:46.688Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T15:20:46.689Z', '/api/uploads/receipt_photo.jpg-mhhuysih.jpg', 'confirmed', 'COMPRA_1762096846692_54249E1F', '2025-11-02T15:22:37.745Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (42, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '2380.00', '0.2000', '1.00', '476', '2025-11-02T15:31:08.084Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T15:31:08.085Z', '/api/uploads/receipt_photo.jpg-mhhvc422.jpg', 'confirmed', 'COMPRA_1762097468086_46E0DE9F', '2025-11-02T15:37:20.789Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (43, '2', 'EST_1762022401962_aqudz', 'MAKTUBIA_SERVIÇO_1762022401955_950900BA_qwe5pp', '3400.00', '0.2000', '1.00', '680', '2025-11-02T15:38:21.837Z', 'Compra registrada via QR code no estabelecimento Tina Daniel. Foto do recibo anexada.', '2025-11-02T15:38:21.839Z', '/api/uploads/receipt_photo.jpg-mhhvlenp.jpg', 'confirmed', 'COMPRA_1762097901840_12308CAA', '2025-11-02T19:53:55.384Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (44, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '2000.00', '0.2000', '1.00', '400', '2025-11-02T15:54:56.632Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T15:54:56.634Z', '/api/uploads/receipt_photo.jpg-mhhw6qc2.jpg', 'confirmed', 'COMPRA_1762098896636_B8FFE3A0', '2025-11-02T19:01:36.827Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, qr_code, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, notes, created_at, receipt_photo, status, purchase_code, confirmed_at, confirmed_by, payment_method, points_used)
VALUES (45, '2', 'MAKTUBIA_SHOP_010', 'MAKTUBIA_SHOP_010', '1800.00', '0.2000', '1.00', '360', '2025-11-02T15:56:09.534Z', 'Compra registrada via QR code no estabelecimento Academia Fitness. Foto do recibo anexada.', '2025-11-02T15:56:09.535Z', '/api/uploads/receipt_photo.jpg-mhhw8akd.jpg', 'confirmed', 'COMPRA_1762098969537_7B38A2CF', '2025-11-02T16:02:03.477Z', 2, 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    qr_code = EXCLUDED.qr_code,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    notes = EXCLUDED.notes,
    receipt_photo = EXCLUDED.receipt_photo,
    status = EXCLUDED.status,
    purchase_code = EXCLUDED.purchase_code,
    confirmed_at = EXCLUDED.confirmed_at,
    confirmed_by = EXCLUDED.confirmed_by,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (56, '4', 'EST_1762358491579_2tmr2', '250.00', '0.2000', '1.00', '5000', '2025-11-05T16:01:31.148Z', '2025-11-04T07:11:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (57, '4', 'EST_1762358491613_9obxy', '120.00', '0.2000', '1.00', '1200', '2025-11-05T16:01:31.148Z', '2025-11-03T09:31:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (58, '5', 'EST_1762358491579_2tmr2', '350.00', '0.2000', '1.00', '7000', '2025-11-05T16:01:31.148Z', '2025-11-05T10:33:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (59, '5', 'EST_1762358491631_s6bvl', '450.00', '0.2000', '1.00', '4500', '2025-11-05T16:01:31.148Z', '2025-11-02T06:02:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (60, '6', 'EST_1762358491613_9obxy', '180.00', '0.2000', '1.00', '1800', '2025-11-05T16:01:31.148Z', '2025-11-03T23:07:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (61, '6', 'EST_1762358491645_hyq2b', '320.00', '0.2000', '1.00', '4800', '2025-11-05T16:01:31.148Z', '2025-10-31T17:04:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (62, '4', 'EST_1762358491659_z4pfi', '150.00', '0.2000', '1.00', '4500', '2025-11-05T16:01:31.148Z', '2025-11-04T22:08:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (63, '5', 'EST_1762358491659_z4pfi', '280.00', '0.2000', '1.00', '8400', '2025-11-05T16:01:31.148Z', '2025-11-03T01:47:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (64, '4', 'EST_1762358760206_f67jk', '250.00', '0.2000', '1.00', '5000', '2025-11-05T16:05:59.709Z', '2025-11-04T07:16:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (65, '4', 'EST_1762358760229_aqdvc', '120.00', '0.2000', '1.00', '1200', '2025-11-05T16:05:59.709Z', '2025-11-02T22:09:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (66, '5', 'EST_1762358760206_f67jk', '350.00', '0.2000', '1.00', '7000', '2025-11-05T16:05:59.709Z', '2025-11-04T23:17:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (67, '5', 'EST_1762358760240_m461b', '450.00', '0.2000', '1.00', '4500', '2025-11-05T16:05:59.709Z', '2025-11-02T03:05:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (68, '6', 'EST_1762358760229_aqdvc', '180.00', '0.2000', '1.00', '1800', '2025-11-05T16:05:59.709Z', '2025-11-04T10:20:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (69, '6', 'EST_1762358760261_cqla1', '320.00', '0.2000', '1.00', '4800', '2025-11-05T16:05:59.709Z', '2025-10-31T20:22:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (70, '4', 'EST_1762358760270_pthbx', '150.00', '0.2000', '1.00', '4500', '2025-11-05T16:05:59.709Z', '2025-11-05T15:03:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (71, '5', 'EST_1762358760270_pthbx', '280.00', '0.2000', '1.00', '8400', '2025-11-05T16:05:59.709Z', '2025-11-03T13:33:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (97, '4', 'EST_1762363765051_ko6dl', '250.00', '0.2000', '1.00', '5000', '2025-11-05T17:29:24.791Z', '2025-11-04T07:43:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (98, '4', 'EST_1762363765082_dh76r', '120.00', '0.2000', '1.00', '1200', '2025-11-05T17:29:24.791Z', '2025-11-03T08:24:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (99, '5', 'EST_1762363765051_ko6dl', '350.00', '0.2000', '1.00', '7000', '2025-11-05T17:29:24.791Z', '2025-11-05T02:03:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (100, '5', 'EST_1762363765098_rycmm', '450.00', '0.2000', '1.00', '4500', '2025-11-05T17:29:24.791Z', '2025-11-02T07:05:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (101, '6', 'EST_1762363765082_dh76r', '180.00', '0.2000', '1.00', '1800', '2025-11-05T17:29:24.791Z', '2025-11-03T23:33:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (102, '6', 'EST_1762363765110_1cfnb', '320.00', '0.2000', '1.00', '4800', '2025-11-05T17:29:24.791Z', '2025-10-31T13:44:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (103, '4', 'EST_1762363765125_rhscl', '150.00', '0.2000', '1.00', '4500', '2025-11-05T17:29:24.791Z', '2025-11-05T12:24:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (104, '5', 'EST_1762363765125_rhscl', '280.00', '0.2000', '1.00', '8400', '2025-11-05T17:29:24.791Z', '2025-11-03T03:02:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (105, '4', 'EST_1762364299600_9erp5', '250.00', '0.2000', '1.00', '5000', '2025-11-05T17:38:19.321Z', '2025-11-03T23:52:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (106, '4', 'EST_1762364299654_o088u', '120.00', '0.2000', '1.00', '1200', '2025-11-05T17:38:19.321Z', '2025-11-03T04:45:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (107, '5', 'EST_1762364299600_9erp5', '350.00', '0.2000', '1.00', '7000', '2025-11-05T17:38:19.321Z', '2025-11-05T14:25:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (108, '5', 'EST_1762364299676_kpyp3', '450.00', '0.2000', '1.00', '4500', '2025-11-05T17:38:19.321Z', '2025-11-02T13:08:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (109, '6', 'EST_1762364299654_o088u', '180.00', '0.2000', '1.00', '1800', '2025-11-05T17:38:19.321Z', '2025-11-04T10:13:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (110, '6', 'EST_1762364299697_l5esb', '320.00', '0.2000', '1.00', '4800', '2025-11-05T17:38:19.321Z', '2025-10-31T17:40:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (111, '4', 'EST_1762364299725_yicdr', '150.00', '0.2000', '1.00', '4500', '2025-11-05T17:38:19.321Z', '2025-11-05T06:59:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

INSERT INTO purchases (purchase_id, user_id, establishment_id, purchase_amount, conversion_rate, bonus_multiplier, points_earned, purchase_date, created_at, status, payment_method, points_used)
VALUES (112, '5', 'EST_1762364299725_yicdr', '280.00', '0.2000', '1.00', '8400', '2025-11-05T17:38:19.321Z', '2025-11-03T06:41:00.000Z', 'confirmed', 'cash', '0')
ON CONFLICT (purchase_id) DO UPDATE SET
    user_id = EXCLUDED.user_id,
    establishment_id = EXCLUDED.establishment_id,
    purchase_amount = EXCLUDED.purchase_amount,
    conversion_rate = EXCLUDED.conversion_rate,
    bonus_multiplier = EXCLUDED.bonus_multiplier,
    points_earned = EXCLUDED.points_earned,
    purchase_date = EXCLUDED.purchase_date,
    status = EXCLUDED.status,
    payment_method = EXCLUDED.payment_method,
    points_used = EXCLUDED.points_used;

-- Users Profile (15 registros)
INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('1', 'João Silva', '+258840000000', 'joao@example.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('10', 'Manuel Chissano', '+258847890123', 'manuel.chissano@example.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('11', 'Sofia Mabunda', '+258848901234', 'sofia.mabunda@example.com', 'gold')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('12', 'Lucas Dhlakama', '+258849012345', 'lucas.dhlakama@example.com', 'diamond')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('13', 'Helena Guamba', '+258841112345', 'helena.guamba@example.com', 'silver')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('14', 'António Macuácua', '+258842223456', 'antonio.macuacua@example.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('15', 'Juliana Maganga', '+258843334567', 'juliana.maganga@example.com', 'platinum')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, level)
VALUES ('16', 'Daniel Nascimento', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('2', 'João Silva', '+258840000000', 'nathan@connecter.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('4', 'João Silva', '+258841234567', 'joao.silva@example.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('5', 'Maria Santos', '+258842345678', 'maria.santos@example.com', 'silver')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('6', 'Carlos Machava', '+258843456789', 'carlos.machava@example.com', 'gold')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('7', 'Ana Cossa', '+258844567890', 'ana.cossa@example.com', 'bronze')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('8', 'Paulo Mendonça', '+258845678901', 'paulo.mendonca@example.com', 'silver')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

INSERT INTO users_profile (user_id, name, phone, email, level)
VALUES ('9', 'Rita Mondlane', '+258846789012', 'rita.mondlane@example.com', 'platinum')
ON CONFLICT (user_id) DO UPDATE SET
    name = EXCLUDED.name,
    phone = EXCLUDED.phone,
    email = EXCLUDED.email,
    level = EXCLUDED.level;

-- Wallets (15 registros)
INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('1', '0.00', '0', '2025-10-30T14:14:31.144Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('10', '0.00', '619', '2025-11-02T12:14:28.772Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('11', '0.00', '5510', '2025-11-02T12:14:28.833Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('12', '0.00', '15000', '2025-11-01T20:02:30.626Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('13', '0.00', '3200', '2025-11-01T20:02:30.934Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('14', '0.00', '315', '2025-11-02T12:14:28.865Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('15', '0.00', '11808', '2025-11-02T12:14:28.845Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('16', '0.00', '1136', '2025-11-03T10:14:32.399Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('2', '0.00', '2696', '2025-11-10T18:28:34.851Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('4', '0.00', '41117', '2025-11-05T17:38:19.321Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('5', '0.00', '80062', '2025-11-05T17:38:19.321Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('6', '0.00', '29125', '2025-11-05T17:38:19.321Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('7', '0.00', '380', '2025-11-01T21:01:11.726Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('8', '0.00', '3100', '2025-11-01T21:01:11.774Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

INSERT INTO wallets (user_id, balance, points, updated_at)
VALUES ('9', '0.00', '8980', '2025-11-01T21:01:11.800Z')
ON CONFLICT (user_id) DO UPDATE SET
    balance = EXCLUDED.balance,
    points = EXCLUDED.points,
    updated_at = EXCLUDED.updated_at;

COMMIT;

-- Fim da exportação
