# Portabilität: UNIVERSAL
# Version: 1.1.0
# Zuletzt validiert: 2026-02-08 (Forensik - Export + erweiterte Felder hinzugefügt)
# Nächste Prüfung: 2026-08-08

CONTACT - Kontaktverwaltung
===========================

BESCHREIBUNG:
  Verwaltet persönliche und geschaeftliche Kontakte mit Freitextsuche,
  Kontext-Filterung und Geburtstags-Übersicht. Kontakte werden per
  Soft-Delete deaktiviert (nicht gelöscht).

BEFEHLE:
  bach contact list              Alle aktiven Kontakte anzeigen
  bach contact list --all        Inkl. inaktive Kontakte
  bach contact list -c privat    Nach Kontext filtern
  bach contact search <term>     Freitextsuche (Name, Email, Telefon, Firma, Notizen, Tags)
  bach contact add "Name"        Neuen Kontakt anlegen
  bach contact show <id>         Kontakt-Details anzeigen
  bach contact edit <id>         Kontakt bearbeiten
  bach contact delete <id>       Kontakt deaktivieren (Soft-Delete)
  bach contact birthday          Geburtstage (nächste 30 Tage)
  bach contact birthday 90       Geburtstage (nächste 90 Tage)
  bach contact export            Alle Kontakte exportieren (Text/CSV/vCard)
  bach contact export --type arzt --format csv  Arzt-Kontakte als CSV
  bach contact export --format vcard --file out.vcf  vCard-Export in Datei
  bach contact help              Diese Hilfe

OPTIONEN FÜR ADD/EDIT:
  --context, -c   Kontext (privat|beruflich|versicherung|finanzen|arzt|sonstige)
  --email, -e     E-Mail-Adresse
  --phone, -p     Telefon (Festnetz)
  --mobile, -m    Mobilnummer
  --address, -a   Adresse
  --birthday, -b  Geburtstag (DD.MM.YYYY oder YYYY-MM-DD)
  --company       Firma/Organisation
  --position      Position/Rolle im Unternehmen
  --tags          Tags kommagetrennt (z.B. "dev,it,freelance")
  --note          Notiz (bei edit: wird an bestehende Notizen angehaengt)
  --name          Name ändern (nur bei edit)

OPTIONEN FÜR EXPORT:
  --type, -t      Nur bestimmten Kontext exportieren (arzt, privat, etc.)
  --format, -f    Exportformat: txt (default), csv, vcard
  --file, -o      Ausgabedatei (sonst Konsolen-Output)

KONTEXTE:
  privat        Freunde, Familie, Bekannte
  beruflich     Arbeitskollegen, Geschaeftskontakte
  versicherung  Versicherungsberater, Agenturen
  finanzen      Steuerberater, Bankberater
  arzt          Aerzte, Therapeuten, Apotheken
  sonstige      Alles andere

DATENBANK:
  Haupttabelle: bach.db / contacts
  Felder: id, name, category, email, phone, phone_mobile, street, birthday,
          organization, position, tags, notes, is_active, created_at, updated_at

BEISPIELE:
  # Kontakt mit allen Details anlegen:
  bach contact add "Dr. Mueller" --context arzt --phone 030-12345 --email mueller@example.de --address "Hauptstr. 1, 10115 Berlin"

  # Beruflichen Kontakt mit Firma und Position:
  bach contact add "Lisa Schmidt" --context beruflich --company "Beispiel GmbH" --position "Teamlead" --tags "dev,it" --email lisa@example.com

  # Kontakt suchen:
  bach contact search Mueller

  # Telefonnummer und Firma ändern:
  bach contact edit 5 --phone 030-99999 --company "Neue GmbH" --note "Gewechselt ab Jan 2026"

  # Alle Versicherungskontakte:
  bach contact list -c versicherung

  # Wer hat bald Geburtstag?
  bach contact birthday 60

  # Export-Beispiele:
  bach contact export                              # Text-Format in Konsole
  bach contact export --format csv                 # CSV in Konsole
  bach contact export --type arzt --format csv     # Nur Arzt-Kontakte als CSV
  bach contact export --format vcard --file kontakte.vcf  # vCard in Datei
  bach contact export --file export.csv            # CSV in Datei

ZUSAMMENSPIEL:
  - Getrennt von health_contacts (Arzt-Kontakte im Gesundheitsmodul)
  - contacts = zentrale Kontakttabelle (CLI + GUI + vCard-Export)
  - GUI: Kontakte-Tab (wenn verfügbar)

BEKANNTE EINSCHRAENKUNGEN:
  - "bach contact list --all" zeigt inaktive Kontakte OHNE visuelle Markierung
  - Tags werden bei Search durchsucht, aber nicht in List-Ansicht angezeigt
