Files
paliad/internal/db/migrations/043_de_instance_split_proceedings.up.sql
m e3b093d9a2 feat(t-paliad-131): Phase B3 cont — DE instance-split proceeding types
PR-4 of the Unified Fristenrechner. Three new proceeding types so the
user can pick "I'm at OLG defending a Berufung" or "I'm at BGH on the
Nichtigkeitsberufung" and get the per-instance timeline directly,
rather than chaining off DE_INF / DE_NULL trailing rows.

Migration 043 adds:

  - DE_INF_OLG (Berufung OLG, sort_order=210): 7 rules. Anchor
    "Zustellung LG-Urteil" + Berufungsschrift (ZPO §517, 1mo) +
    Berufungsbegründung (ZPO §520(2), 2mo, anchored on Urteil not on
    notice) + Berufungserwiderung (ZPO §521(2), court-set 1mo typ.) +
    Anschlussberufung (ZPO §524(2), filed-with-erwiderung) +
    mündl. Verhandlung + OLG-Urteil.
  - DE_INF_BGH (Revision/NZB BGH, sort_order=220): 8 rules. Anchor
    "Zustellung OLG-Urteil" + parallel NZB (§544.1, 1mo) /
    NZB-Begründung (§544.4, 2mo) / Revisionsfrist (§548, 1mo) /
    Revisionsbegründung (§551.2, 2mo) — all four from the
    OLG-Urteil-Datum since they're alternatives. Plus
    Revisionserwiderung (§554, 1mo court-set) + mündl. + BGH-Urteil.
  - DE_NULL_BGH (Berufung BGH gegen Nichtigkeit, sort_order=230): 6
    rules. Anchor "Zustellung BPatG-Urteil" + Berufungsschrift
    (PatG §110.1, 1mo) + Berufungsbegründung (PatG §111.1, 3mo) +
    Berufungserwiderung (PatG §111.3 → ZPO §521.2, 2mo court-set typ.)
    + mündl. + BGH-Urteil.

Anchor convention: synthetic 0-duration root rule "Zustellung [prev-
instance] Urteil" with party='both' + event_type='filing' so it
renders as IsRootEvent (= the trigger date). Per design, this is the
honest model — the user enters the actual previous-instance Urteil
date, no fabricated inter-stage gap.

Four new DE-only concepts (per slug rule: DE for German-only
procedures): nichtzulassungsbeschwerde, nichtzulassungsbeschwerde-
begruendung, revisionsfrist, revisionsbegruendung. Other rules reuse
the existing shared concepts (notice-of-appeal, statement-of-grounds-
of-appeal, response-to-appeal, cross-appeal, oral-hearing, decision).

Frontend: 3 new tiles in DE_TYPES + 8 new i18n keys (DE+EN). Tiles
appear between DE_INF and DE_NULL per sort_order grouping.

Out of scope (kept in DE_INF / DE_NULL trees during transition until
Phase D Full Appeal Chain ships): the existing trailing rows
de_inf.berufung / de_inf.beruf_begr / de_null.berufung /
de_null.beruf_begr stay live so users picking those trees still see
the appeal-period entry. Phase D will gate the visibility.

Live-verified all 3 trees on paliad.de:
  DE_INF_OLG trigger 2026-05-04 → Berufung 2026-06-04 (1mo) /
    Begründung 2026-07-06 (2mo from Urteil, weekend-shift) /
    Erwiderung 2026-08-06 (1mo from Begründung) / Anschluss
    2026-08-06 (filed-with-erwiderung).
  DE_INF_BGH trigger 2026-05-04 → NZB 2026-06-04 (1mo) /
    NZB-Begr 2026-07-06 / Revision 2026-06-04 / RevBegr 2026-07-06
    (parallel options) / RevErw 2026-08-06.
  DE_NULL_BGH trigger 2026-05-04 → Berufung 2026-06-04 / Begr
    2026-08-04 (3mo per PatG §111.1 = the now-fixed seed) / Erwidg
    2026-10-05 (2mo from Begr, weekend-shift).
2026-05-05 02:19:37 +02:00

349 lines
23 KiB
SQL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- t-paliad-131 Phase B3 (continued): DE instance-split proceeding types.
--
-- Today's DE_INF tree mixes the LG cycle with two trailing rows
-- (Berufung + Berufungsbegründung) that conceptually belong to the OLG
-- instance. DE_NULL similarly trails into BGH-Berufung. Per design §3.4
-- ("Full Appeal Chain") we want each instance as its own proceeding so
-- the user can pick "I'm at OLG defending a Berufung" and get the full
-- OLG cycle (Berufungserwiderung, Anschlussberufung, mündl. Verhandlung,
-- OLG-Urteil) — not just the appeal-period entry.
--
-- Three new types in this migration. The existing trailing rows on
-- DE_INF / DE_NULL stay in place during the transition (Phase D's
-- Full-Appeal-Chain checkbox will eventually stitch the per-instance
-- timelines together; until then, users picking the LG/BPatG tree still
-- see the appeal-period entries as before).
--
-- Anchor convention for the new trees: a synthetic 0-duration root
-- "Zustellung des [previous-instance] Urteils" with party='both' and
-- event_type='filing' so it renders as IsRootEvent (= the trigger
-- date). event_type='filing' is a semantic stretch (the user is
-- being served, not filing) but matches the existing IsRootEvent
-- gating without needing a schema change to event_type.
--
-- Rule sources (German civil + patent procedure law):
-- ZPO §517 — Berufungsfrist (1 Monat ab Urteilszustellung)
-- ZPO §520(2) — Berufungsbegründung (2 Monate ab Urteilszustellung)
-- ZPO §521(2) — Berufungserwiderung (richterliche Frist, typ. 4 Wochen)
-- ZPO §524(2) — Anschlussberufung (bis Ablauf der §521-Frist)
-- ZPO §544(1) — Nichtzulassungsbeschwerde (1 Monat ab Urteilszustellung)
-- ZPO §544(4) — NZB-Begründung (2 Monate ab Urteilszustellung)
-- ZPO §548 — Revisionsfrist (1 Monat ab Urteilszustellung)
-- ZPO §551(2) — Revisionsbegründung (2 Monate ab Urteilszustellung)
-- ZPO §554 — Revisionserwiderung (richterliche Frist)
-- PatG §110(1) — BGH-Berufungsfrist (1 Monat)
-- PatG §111(1) — BGH-Berufungsbegründung (3 Monate)
-- PatG §111(3) → ZPO §521 — BGH-Berufungserwiderung (richterliche Frist)
-- ============================================================================
-- 1. New proceeding types
-- ============================================================================
INSERT INTO paliad.proceeding_types (code, name, name_en, description, jurisdiction, category, default_color, sort_order, is_active)
VALUES
('DE_INF_OLG', 'Berufung OLG (Verletzung)', 'Appeal OLG (Infringement)',
'OLG-Berufungsverfahren gegen ein patentrechtliches LG-Urteil. Trigger ist die Zustellung des LG-Urteils.',
'DE', 'fristenrechner', '#1d4ed8', 210, true),
('DE_INF_BGH', 'Revision/NZB BGH (Verletzung)', 'Revision / Non-admission Appeal BGH (Infringement)',
'BGH-Verfahren gegen ein patentrechtliches OLG-Urteil — Revision oder Nichtzulassungsbeschwerde. Trigger ist die Zustellung des OLG-Urteils.',
'DE', 'fristenrechner', '#1d4ed8', 220, true),
('DE_NULL_BGH', 'Berufung BGH (Nichtigkeit)', 'Appeal BGH (Nullity)',
'BGH-Berufungsverfahren gegen ein BPatG-Nichtigkeitsurteil. Trigger ist die Zustellung des BPatG-Urteils.',
'DE', 'fristenrechner', '#1d4ed8', 230, true)
ON CONFLICT (code) DO UPDATE SET
name = EXCLUDED.name,
name_en = EXCLUDED.name_en,
description = EXCLUDED.description,
jurisdiction = EXCLUDED.jurisdiction,
category = EXCLUDED.category,
default_color = EXCLUDED.default_color,
sort_order = EXCLUDED.sort_order,
is_active = EXCLUDED.is_active;
-- ============================================================================
-- 2. New DE-only concepts (NZB / Revision)
-- ============================================================================
INSERT INTO paliad.deadline_concepts (slug, name_de, name_en, description, aliases, party, category, sort_order) VALUES
('nichtzulassungsbeschwerde', 'Nichtzulassungsbeschwerde', 'Non-admission Appeal (NZB)',
'Beschwerde gegen die Nichtzulassung der Revision in einem OLG-Urteil (§ 544 ZPO). 1-Monats-Frist ab Urteilszustellung. DE-spezifisches Rechtsmittel — kein UPC/EPC-Äquivalent.',
ARRAY['Nichtzulassungsbeschwerde', 'NZB', 'non-admission appeal', 'Nichtzulassungs­beschwerde'],
'both', 'submission', 35),
('nichtzulassungsbeschwerde-begruendung', 'Nichtzulassungsbeschwerde-Begründung', 'NZB Statement of Grounds',
'Begründung der Nichtzulassungsbeschwerde (§ 544(4) ZPO) — 2 Monate ab Urteilszustellung, eigenständige Frist neben der NZB-Einlegung.',
ARRAY['NZB-Begründung', 'NZB Begründung', 'Begründung Nichtzulassungsbeschwerde'],
'both', 'submission', 36),
('revisionsfrist', 'Revisionsfrist', 'Revision Period',
'Frist zur Einlegung der Revision beim BGH (§ 548 ZPO) — 1 Monat ab Urteilszustellung. DE-spezifisches Rechtsmittel.',
ARRAY['Revisionsfrist', 'Revision', 'Einlegung Revision'],
'both', 'submission', 37),
('revisionsbegruendung', 'Revisionsbegründung', 'Revision Statement of Grounds',
'Begründung der Revision beim BGH (§ 551(2) ZPO) — 2 Monate ab Urteilszustellung.',
ARRAY['Revisionsbegründung', 'Begründung Revision'],
'both', 'submission', 38)
ON CONFLICT (slug) DO UPDATE SET
name_de = EXCLUDED.name_de,
name_en = EXCLUDED.name_en,
description = EXCLUDED.description,
aliases = EXCLUDED.aliases,
party = EXCLUDED.party,
sort_order = EXCLUDED.sort_order,
updated_at = now();
-- ============================================================================
-- 3. DE_INF_OLG rules (anchor = LG-Urteil-Zustellung)
-- ============================================================================
-- Wave 0: anchor row (root event)
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, NULL,
'de_inf_olg.urteil_lg', 'Zustellung LG-Urteil', 'Service of LG Judgment',
'both', 'filing', true, 0, 'months', 'after', NULL,
'Zustellung des erstinstanzlichen Urteils (Trigger für die OLG-Berufungsfristen).',
'Service of the LG judgment (trigger for the OLG appeal deadlines).',
0, NULL, NULL, NULL, false, true
FROM paliad.proceeding_types pt
WHERE pt.code = 'DE_INF_OLG';
-- Wave 1: rules anchored on urteil_lg
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id, new.code, new.name, new.name_en, new.primary_party, new.event_type,
true, new.duration_value, new.duration_unit, 'after', new.rule_code, new.deadline_notes, new.deadline_notes_en,
new.sequence_order, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = new.concept_slug),
new.legal_source, false, true
FROM (VALUES
('de_inf_olg.urteil_lg', 'de_inf_olg.berufung', 'Berufungsschrift', 'Notice of Appeal',
'both', 'filing', 1, 'months', '§ 517 ZPO',
'Berufung muss binnen 1 Monat ab Zustellung des Urteils eingelegt werden (§ 517 ZPO). Spätestens 5 Monate nach Verkündung.',
'Notice of appeal must be filed within 1 month of service of the judgment (ZPO §517). At the latest 5 months after pronouncement.',
10, 'notice-of-appeal', 'DE.ZPO.517'),
('de_inf_olg.urteil_lg', 'de_inf_olg.begruendung', 'Berufungsbegründung', 'Statement of Grounds of Appeal',
'both', 'filing', 2, 'months', '§ 520 ZPO',
'Berufung muss binnen 2 Monaten ab Urteilszustellung begründet werden (§ 520(2) ZPO). Verlängerung um max. 1 Monat auf Antrag möglich.',
'The appeal must be substantiated within 2 months of service of the judgment (ZPO §520(2)). Extension by up to 1 month possible on request.',
20, 'statement-of-grounds-of-appeal', 'DE.ZPO.520.2'),
('de_inf_olg.urteil_lg', 'de_inf_olg.termin', 'Mündliche Verhandlung', 'Oral Hearing',
'court', 'hearing', 0, 'months', NULL, NULL, NULL, 50, 'oral-hearing', NULL),
('de_inf_olg.urteil_lg', 'de_inf_olg.urteil_olg', 'OLG-Urteil', 'OLG Judgment',
'court', 'decision', 0, 'months', NULL, NULL, NULL, 60, 'decision', NULL)
) AS new(parent_code, code, name, name_en, primary_party, event_type, duration_value, duration_unit, rule_code, deadline_notes, deadline_notes_en, sequence_order, concept_slug, legal_source)
JOIN paliad.proceeding_types pt ON pt.code = 'DE_INF_OLG'
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = new.parent_code;
-- Wave 2: Berufungserwiderung (parent=begruendung) + Anschlussberufung (parent=erwiderung)
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id, new.code, new.name, new.name_en, new.primary_party, new.event_type,
true, new.duration_value, new.duration_unit, 'after', new.rule_code, new.deadline_notes, new.deadline_notes_en,
new.sequence_order, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = new.concept_slug),
new.legal_source, false, true
FROM (VALUES
('de_inf_olg.begruendung', 'de_inf_olg.erwiderung', 'Berufungserwiderung', 'Response to Appeal',
'both', 'filing', 1, 'months', '§ 521 ZPO',
'Erwiderung auf die Berufungsbegründung — vom Gericht gesetzte Frist (§ 521(2) ZPO), typischerweise mindestens 1 Monat.',
'Response to the Statement of Grounds of Appeal — court-set deadline (ZPO §521(2)), typically at least 1 month.',
30, 'response-to-appeal', 'DE.ZPO.521.2')
) AS new(parent_code, code, name, name_en, primary_party, event_type, duration_value, duration_unit, rule_code, deadline_notes, deadline_notes_en, sequence_order, concept_slug, legal_source)
JOIN paliad.proceeding_types pt ON pt.code = 'DE_INF_OLG'
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = new.parent_code;
-- Wave 3: Anschlussberufung (parent=erwiderung)
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id,
'de_inf_olg.anschluss', 'Anschlussberufung', 'Cross-Appeal',
'both', 'filing', false, 0, 'months', 'after', '§ 524 ZPO',
'Anschlussberufung bis zum Ablauf der Frist zur Berufungserwiderung (§ 524(2) ZPO). Mit Erwiderung gleichzeitig einreichbar.',
'Cross-appeal until expiry of the deadline for the Response to Appeal (ZPO §524(2)). May be filed together with the response.',
35, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = 'cross-appeal'),
'DE.ZPO.524.2', false, true
FROM paliad.proceeding_types pt
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = 'de_inf_olg.erwiderung'
WHERE pt.code = 'DE_INF_OLG';
-- ============================================================================
-- 4. DE_INF_BGH rules (anchor = OLG-Urteil-Zustellung)
-- ============================================================================
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, NULL,
'de_inf_bgh.urteil_olg', 'Zustellung OLG-Urteil', 'Service of OLG Judgment',
'both', 'filing', true, 0, 'months', 'after', NULL,
'Zustellung des Berufungsurteils des OLG (Trigger für NZB / Revisionsfristen).',
'Service of the OLG appeal judgment (trigger for NZB / revision deadlines).',
0, NULL, NULL, NULL, false, true
FROM paliad.proceeding_types pt
WHERE pt.code = 'DE_INF_BGH';
-- All rules anchored on the OLG-Urteil — they are PARALLEL options
-- (NZB if revision wasn't admitted; Revision if it was), not sequential.
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id, new.code, new.name, new.name_en, new.primary_party, new.event_type,
true, new.duration_value, new.duration_unit, 'after', new.rule_code, new.deadline_notes, new.deadline_notes_en,
new.sequence_order, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = new.concept_slug),
new.legal_source, false, true
FROM (VALUES
('de_inf_bgh.urteil_olg', 'de_inf_bgh.nzb', 'Nichtzulassungsbeschwerde', 'Non-admission Appeal',
'both', 'filing', 1, 'months', '§ 544 ZPO',
'NZB binnen 1 Monat ab Zustellung des OLG-Urteils einlegen (§ 544(1) ZPO). Wird gegen Nichtzulassung der Revision eingelegt.',
'Non-admission appeal within 1 month of service of the OLG judgment (ZPO §544(1)). Filed against the OLG''s refusal to admit revision.',
10, 'nichtzulassungsbeschwerde', 'DE.ZPO.544.1'),
('de_inf_bgh.urteil_olg', 'de_inf_bgh.nzb_begr', 'Nichtzulassungsbeschwerde-Begründung','NZB Statement of Grounds',
'both', 'filing', 2, 'months', '§ 544 ZPO',
'Begründung der NZB binnen 2 Monaten ab Urteilszustellung (§ 544(4) ZPO). Eigenständige Frist neben der NZB-Einlegung.',
'NZB Statement of Grounds within 2 months of service of the judgment (ZPO §544(4)). Separate from the NZB filing deadline.',
20, 'nichtzulassungsbeschwerde-begruendung','DE.ZPO.544.4'),
('de_inf_bgh.urteil_olg', 'de_inf_bgh.revision', 'Revisionsfrist', 'Revision Period',
'both', 'filing', 1, 'months', '§ 548 ZPO',
'Revision binnen 1 Monat ab Zustellung des Urteils einlegen (§ 548 ZPO).',
'Revision must be filed within 1 month of service of the judgment (ZPO §548).',
30, 'revisionsfrist', 'DE.ZPO.548'),
('de_inf_bgh.urteil_olg', 'de_inf_bgh.revisionsbegr','Revisionsbegründung', 'Revision Statement of Grounds',
'both', 'filing', 2, 'months', '§ 551 ZPO',
'Begründung der Revision binnen 2 Monaten ab Urteilszustellung (§ 551(2) ZPO). Verlängerung um max. 2 Monate auf Antrag möglich.',
'Revision Statement of Grounds within 2 months of service of the judgment (ZPO §551(2)). Extension by up to 2 months possible on request.',
40, 'revisionsbegruendung', 'DE.ZPO.551.2')
) AS new(parent_code, code, name, name_en, primary_party, event_type, duration_value, duration_unit, rule_code, deadline_notes, deadline_notes_en, sequence_order, concept_slug, legal_source)
JOIN paliad.proceeding_types pt ON pt.code = 'DE_INF_BGH'
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = new.parent_code;
-- Revisionserwiderung (parent=revisionsbegr)
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id,
'de_inf_bgh.revisionserw', 'Revisionserwiderung', 'Response to Revision',
'both', 'filing', false, 1, 'months', 'after', '§ 554 ZPO',
'Erwiderung auf die Revisionsbegründung — vom Gericht gesetzte Frist (§ 554 ZPO), typischerweise mindestens 1 Monat.',
'Response to the Revision Statement of Grounds — court-set deadline (ZPO §554), typically at least 1 month.',
50, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = 'response-to-appeal'),
'DE.ZPO.554', false, true
FROM paliad.proceeding_types pt
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = 'de_inf_bgh.revisionsbegr'
WHERE pt.code = 'DE_INF_BGH';
-- BGH terminal hearing + decision
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id, new.code, new.name, new.name_en, new.primary_party, new.event_type,
true, new.duration_value, new.duration_unit, 'after', new.rule_code, new.deadline_notes, new.deadline_notes_en,
new.sequence_order, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = new.concept_slug),
new.legal_source, false, true
FROM (VALUES
('de_inf_bgh.urteil_olg', 'de_inf_bgh.termin', 'Mündliche Verhandlung BGH', 'BGH Oral Hearing',
'court', 'hearing', 0, 'months', NULL, NULL, NULL, 70, 'oral-hearing', NULL),
('de_inf_bgh.urteil_olg', 'de_inf_bgh.urteil_bgh', 'BGH-Urteil', 'BGH Judgment',
'court', 'decision', 0, 'months', NULL, NULL, NULL, 80, 'decision', NULL)
) AS new(parent_code, code, name, name_en, primary_party, event_type, duration_value, duration_unit, rule_code, deadline_notes, deadline_notes_en, sequence_order, concept_slug, legal_source)
JOIN paliad.proceeding_types pt ON pt.code = 'DE_INF_BGH'
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = new.parent_code;
-- ============================================================================
-- 5. DE_NULL_BGH rules (anchor = BPatG-Urteil-Zustellung)
-- ============================================================================
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, NULL,
'de_null_bgh.urteil_bpatg', 'Zustellung BPatG-Urteil', 'Service of BPatG Judgment',
'both', 'filing', true, 0, 'months', 'after', NULL,
'Zustellung des Nichtigkeitsurteils des BPatG (Trigger für die BGH-Berufungsfristen).',
'Service of the BPatG nullity judgment (trigger for the BGH appeal deadlines).',
0, NULL, NULL, NULL, false, true
FROM paliad.proceeding_types pt
WHERE pt.code = 'DE_NULL_BGH';
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id, new.code, new.name, new.name_en, new.primary_party, new.event_type,
true, new.duration_value, new.duration_unit, 'after', new.rule_code, new.deadline_notes, new.deadline_notes_en,
new.sequence_order, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = new.concept_slug),
new.legal_source, false, true
FROM (VALUES
('de_null_bgh.urteil_bpatg', 'de_null_bgh.berufung', 'Berufungsschrift', 'Notice of Appeal',
'both', 'filing', 1, 'months', '§ 110 PatG',
'Berufung beim BGH binnen 1 Monat ab Zustellung des BPatG-Urteils einlegen (§ 110(1) PatG).',
'Notice of appeal to the BGH within 1 month of service of the BPatG judgment (PatG §110(1)).',
10, 'notice-of-appeal', 'DE.PatG.110.1'),
('de_null_bgh.urteil_bpatg', 'de_null_bgh.begruendung', 'Berufungsbegründung', 'Statement of Grounds of Appeal',
'both', 'filing', 3, 'months', '§ 111 PatG',
'Berufung muss binnen 3 Monaten ab Zustellung des Urteils begründet werden (§ 111(1) PatG); spätestens 5 Monate nach Verkündung.',
'The appeal must be substantiated within 3 months of service of the judgment (PatG §111(1)); at the latest 5 months after pronouncement.',
20, 'statement-of-grounds-of-appeal', 'DE.PatG.111.1'),
('de_null_bgh.urteil_bpatg', 'de_null_bgh.termin', 'Mündliche Verhandlung BGH', 'BGH Oral Hearing',
'court', 'hearing', 0, 'months', NULL, NULL, NULL, 50, 'oral-hearing', NULL),
('de_null_bgh.urteil_bpatg', 'de_null_bgh.urteil_bgh', 'BGH-Urteil', 'BGH Judgment',
'court', 'decision', 0, 'months', NULL, NULL, NULL, 60, 'decision', NULL)
) AS new(parent_code, code, name, name_en, primary_party, event_type, duration_value, duration_unit, rule_code, deadline_notes, deadline_notes_en, sequence_order, concept_slug, legal_source)
JOIN paliad.proceeding_types pt ON pt.code = 'DE_NULL_BGH'
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = new.parent_code;
-- Berufungserwiderung BGH (parent=begruendung)
INSERT INTO paliad.deadline_rules (
proceeding_type_id, parent_id, code, name, name_en, primary_party, event_type,
is_mandatory, duration_value, duration_unit, timing, rule_code, deadline_notes, deadline_notes_en,
sequence_order, condition_flag, concept_id, legal_source, is_spawn, is_active
)
SELECT
pt.id, parent_rule.id,
'de_null_bgh.erwiderung', 'Berufungserwiderung', 'Response to Appeal',
'both', 'filing', false, 2, 'months', 'after', '§ 111 PatG',
'Erwiderung auf die BGH-Berufungsbegründung (§ 111(3) PatG i.V.m. § 521(2) ZPO) — vom Gericht gesetzte Frist, typischerweise ~2 Monate.',
'Response to the BGH Statement of Grounds (PatG §111(3) read with ZPO §521(2)) — court-set deadline, typically ~2 months.',
30, NULL,
(SELECT id FROM paliad.deadline_concepts WHERE slug = 'response-to-appeal'),
'DE.PatG.111.3', false, true
FROM paliad.proceeding_types pt
JOIN paliad.deadline_rules parent_rule ON parent_rule.proceeding_type_id = pt.id AND parent_rule.code = 'de_null_bgh.begruendung'
WHERE pt.code = 'DE_NULL_BGH';