-- Fausses operations de janvier a juin 2026, pour alimenter l'assistant IA,
-- les statistiques et la navigation par mois. A importer via phpMyAdmin.
-- POUR L'UTILISATEUR id = 1 (adapter si besoin). Complementaire du seed
-- operations_juillet_2026_demo.sql.
-- Nettoyage : database/seeds/clear_operations_jan_juin_2026_demo.sql

-- Categories et enseignes utilisees (creees seulement si absentes)
INSERT IGNORE INTO categories (name, color, icon) VALUES
    ('Logement', '#6284f5', 'fa-solid fa-house'),
    ('Courses', '#ef4869', 'fa-solid fa-cart-shopping'),
    ('Transport', '#10b981', 'fa-solid fa-bus'),
    ('Restaurants', '#f5a623', 'fa-solid fa-utensils'),
    ('Loisirs', '#8b5cf6', 'fa-solid fa-gamepad'),
    ('Abonnements', '#f97316', 'fa-solid fa-repeat'),
    ('Santé', '#ec4899', 'fa-solid fa-heart-pulse'),
    ('Divers', '#94a3b8', 'fa-solid fa-ellipsis');

INSERT IGNORE INTO merchants (name) VALUES
    ('Carrefour'), ('Lidl'), ('Monoprix'), ('Netflix'), ('Spotify');

INSERT INTO operations (user_id, type, kind, label, amount_cents, category_id, merchant_id, operation_date) VALUES
-- ------------------------------- JANVIER --------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-01-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-01-02'),
    (1, 'expense', 'fixed',        'Électricité',              5830, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-01-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-01-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-01-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-01-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-01-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-01-06'),
    (1, 'expense', 'unique',       'Carrefour',               11845, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-01-08'),
    (1, 'expense', 'unique',       'Lidl',                     7230, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-01-15'),
    (1, 'expense', 'unique',       'Restaurant',               4250, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-01-17'),
    (1, 'expense', 'unique',       'Cinéma',                   2400, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-01-24'),
    (1, 'expense', 'unique',       'Pharmacie',                1860, (SELECT id FROM categories WHERE name = 'Santé' LIMIT 1),       NULL, '2026-01-27'),
    (1, 'expense', 'unique',       'Monoprix',                 3890, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-01-29'),
-- ------------------------------- FEVRIER --------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-02-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-02-02'),
    (1, 'expense', 'fixed',        'Électricité',              5210, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-02-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-02-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-02-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-02-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-02-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-02-06'),
    (1, 'expense', 'unique',       'Carrefour',               10420, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-02-07'),
    (1, 'expense', 'unique',       'Pizzeria',                 3680, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-02-13'),
    (1, 'expense', 'unique',       'Lidl',                     6685, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-02-14'),
    (1, 'income',  'refund',       'Remboursement mutuelle',   4520, NULL, NULL, '2026-02-18'),
    (1, 'expense', 'unique',       'Concert',                  5900, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-02-21'),
    (1, 'expense', 'unique',       'Monoprix',                 4415, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-02-25'),
    (1, 'expense', 'unique',       'Coiffeur',                 2800, (SELECT id FROM categories WHERE name = 'Divers' LIMIT 1),      NULL, '2026-02-26'),
-- ------------------------------- MARS -----------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-03-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-03-02'),
    (1, 'expense', 'fixed',        'Électricité',              4975, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-03-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-03-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-03-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-03-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-03-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-03-06'),
    (1, 'expense', 'unique',       'Carrefour',               12260, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-03-06'),
    (1, 'expense', 'unique',       'Lidl',                     7840, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-03-13'),
    (1, 'expense', 'unique',       'Restaurant',               5120, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-03-14'),
    (1, 'expense', 'unique',       'Jeu vidéo',                3999, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-03-19'),
    (1, 'expense', 'unique',       'Pharmacie',                1240, (SELECT id FROM categories WHERE name = 'Santé' LIMIT 1),       NULL, '2026-03-22'),
    (1, 'expense', 'unique',       'Monoprix',                 4130, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-03-27'),
    (1, 'expense', 'unique',       'Cadeau anniversaire',      6500, (SELECT id FROM categories WHERE name = 'Divers' LIMIT 1),      NULL, '2026-03-28'),
-- ------------------------------- AVRIL ----------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-04-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-04-02'),
    (1, 'expense', 'fixed',        'Électricité',              4490, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-04-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-04-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-04-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-04-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-04-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-04-06'),
    (1, 'expense', 'unique',       'Carrefour',               10975, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-04-04'),
    (1, 'expense', 'unique',       'Lidl',                     6920, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-04-11'),
    (1, 'expense', 'unique',       'Brunch',                   2750, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-04-12'),
    (1, 'income',  'family',       'Aide famille',            15000, NULL, NULL, '2026-04-15'),
    (1, 'expense', 'unique',       'Cinéma',                   2400, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-04-18'),
    (1, 'expense', 'unique',       'Pharmacie',                2210, (SELECT id FROM categories WHERE name = 'Santé' LIMIT 1),       NULL, '2026-04-21'),
    (1, 'expense', 'unique',       'Monoprix',                 4760, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-04-24'),
-- ------------------------------- MAI ------------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-05-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-05-02'),
    (1, 'expense', 'unique',       'Carrefour',               11590, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-05-02'),
    (1, 'expense', 'fixed',        'Électricité',              4120, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-05-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-05-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-05-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-05-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-05-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-05-06'),
    (1, 'expense', 'unique',       'Lidl',                     7455, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-05-09'),
    (1, 'expense', 'unique',       'Restaurant',               4830, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-05-10'),
    (1, 'expense', 'unique',       'Concert',                  4500, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-05-16'),
    (1, 'income',  'refund',       'Remboursement impôts',    12000, NULL, NULL, '2026-05-20'),
    (1, 'expense', 'unique',       'Monoprix',                 3625, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-05-23'),
    (1, 'expense', 'unique',       'Coiffeur',                 2800, (SELECT id FROM categories WHERE name = 'Divers' LIMIT 1),      NULL, '2026-05-29'),
-- ------------------------------- JUIN -----------------------------------------
    (1, 'income',  'salary',       'Salaire',                238000, NULL, NULL, '2026-06-01'),
    (1, 'expense', 'fixed',        'Loyer',                   85000, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-06-02'),
    (1, 'expense', 'fixed',        'Électricité',              4360, (SELECT id FROM categories WHERE name = 'Logement' LIMIT 1),    NULL, '2026-06-03'),
    (1, 'expense', 'fixed',        'Passe Navigo',             8640, (SELECT id FROM categories WHERE name = 'Transport' LIMIT 1),   NULL, '2026-06-04'),
    (1, 'expense', 'subscription', 'Internet fibre',           2999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-06-05'),
    (1, 'expense', 'subscription', 'Forfait mobile',           1999, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), NULL, '2026-06-05'),
    (1, 'expense', 'unique',       'Carrefour',               11135, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Carrefour' LIMIT 1), '2026-06-05'),
    (1, 'expense', 'subscription', 'Netflix',                  1349, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Netflix' LIMIT 1), '2026-06-06'),
    (1, 'expense', 'subscription', 'Spotify',                  1099, (SELECT id FROM categories WHERE name = 'Abonnements' LIMIT 1), (SELECT id FROM merchants WHERE name = 'Spotify' LIMIT 1), '2026-06-06'),
    (1, 'expense', 'unique',       'Lidl',                     8110, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Lidl' LIMIT 1), '2026-06-12'),
    (1, 'expense', 'unique',       'Pizzeria',                 3340, (SELECT id FROM categories WHERE name = 'Restaurants' LIMIT 1), NULL, '2026-06-13'),
    (1, 'expense', 'unique',       'Cinéma',                   1200, (SELECT id FROM categories WHERE name = 'Loisirs' LIMIT 1),     NULL, '2026-06-19'),
    (1, 'expense', 'unique',       'Pharmacie',                1580, (SELECT id FROM categories WHERE name = 'Santé' LIMIT 1),       NULL, '2026-06-24'),
    (1, 'expense', 'unique',       'Monoprix',                 5245, (SELECT id FROM categories WHERE name = 'Courses' LIMIT 1),     (SELECT id FROM merchants WHERE name = 'Monoprix' LIMIT 1), '2026-06-26'),
    (1, 'expense', 'unique',       'Cadeau mariage',           8000, (SELECT id FROM categories WHERE name = 'Divers' LIMIT 1),      NULL, '2026-06-27');
