-- Phase A seed: 6 UPC proceeding types + ZPO civil placeholder.
-- Ported from /home/m/dev/KanzlAI/backend/seed/seed_upc_timeline.sql.
-- Colors match the traffic-light palette used in the UI design (§6).

INSERT INTO paliad.proceeding_types (code, name, description, jurisdiction, category, default_color, sort_order, is_active) VALUES
    ('INF',        'Infringement',                 'Patent infringement proceedings',                              'UPC', 'litigation', '#3b82f6', 1, true),
    ('REV',        'Revocation',                   'Standalone revocation proceedings',                            'UPC', 'litigation', '#ef4444', 2, true),
    ('CCR',        'Counterclaim for Revocation',  'Counterclaim for revocation within infringement',              'UPC', 'litigation', '#ef4444', 3, true),
    ('APM',        'Provisional Measures',         'Application for preliminary injunction',                       'UPC', 'litigation', '#f59e0b', 4, true),
    ('APP',        'Appeal',                       'Appeal to the Court of Appeal',                                'UPC', 'litigation', '#8b5cf6', 5, true),
    ('AMD',        'Application to Amend Patent',  'Sub-proceeding for patent amendment during revocation',        'UPC', 'litigation', '#10b981', 6, true),
    ('ZPO_CIVIL',  'ZPO Civil Proceedings',        'German civil proceedings under ZPO (LG/OLG)',                  'DE',  'litigation', '#6366f1', 7, true)
ON CONFLICT (code) DO UPDATE SET
    name          = EXCLUDED.name,
    description   = EXCLUDED.description,
    jurisdiction  = EXCLUDED.jurisdiction,
    category      = EXCLUDED.category,
    default_color = EXCLUDED.default_color,
    sort_order    = EXCLUDED.sort_order,
    is_active     = EXCLUDED.is_active;
