feat(import): RPRO3-Importer um 6 Feature-Tabellen erweitern
becken→Gehege-Reinigung, herktier→Erwerb, abgeben/abstat→Reservierung, getback→Rücknahmen, nachfrage→Warteliste, ausz→Ausstellungen. Deterministische GUIDs, idempotenter Re-Import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,96 @@ namespace GerbilManagerWebAPI.Import.Rpro3
|
||||
public List<string> FileNames { get; } = new();
|
||||
}
|
||||
|
||||
// ── Feature-Tabellen (becken/herktier/abgeben/abstat/getback/nachfrage/ausz) ──
|
||||
|
||||
/// <summary>becken_tb: Gehege/Becken (id, _BEZ Name, _SIZE Maße, _MENGE Kapazität,
|
||||
/// _CLEANED letzte Reinigung JDN, _CYCLUS Reinigungsintervall Tage).</summary>
|
||||
public sealed class Rpro3Becken
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
public string? Name { get; set; }
|
||||
public string? Size { get; set; }
|
||||
public int? Capacity { get; set; }
|
||||
public DateOnly? LastCleaned { get; set; }
|
||||
public int? CycleDays { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>herktier_tb: Erwerb eines Tieres (_TID stamm-id, _DATE Kaufdatum JDN,
|
||||
/// _PRICE Kaufpreis, _BEM Notiz).</summary>
|
||||
public sealed class Rpro3Acquisition
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
public string? Tid { get; set; } // stamm-id
|
||||
public DateOnly? Date { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>abgeben_tb: Reservierung/Vormerkung (tid stamm- oder wurftier-id, _RES reserviert?,
|
||||
/// _TERMIN Abgabetermin JDN, _ABN Abnehmer-Kontakt, _BEM Notiz).</summary>
|
||||
public sealed class Rpro3Abgeben
|
||||
{
|
||||
public required string Tid { get; init; } // stamm-id ("N") oder wurftier-id ("XjY")
|
||||
public bool Reserved { get; set; }
|
||||
public DateOnly? Appointment { get; set; }
|
||||
public int? AbnId { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>abstat_tb: Abgabe-Abschluss (tid stamm-id, _IDABN Abnehmer-Kontakt,
|
||||
/// _AM Abgabedatum JDN, _PRICE Abgabepreis, _BEM Notiz).</summary>
|
||||
public sealed class Rpro3Abstat
|
||||
{
|
||||
public required string Tid { get; init; } // stamm-id
|
||||
public int? AbnId { get; set; }
|
||||
public DateOnly? HandedOver { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>getback_tb: Rücknahme (_TID stamm-/wurftier-id, _ZAM Rücknahmedatum JDN,
|
||||
/// _ZPREIS Rücknahmepreis, _AM ursprüngliches Abgabedatum JDN, _PREIS ursprünglicher Preis,
|
||||
/// _ABN Kontakt, von dem zurückkam, _BEM Notiz).</summary>
|
||||
public sealed class Rpro3Getback
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
public string? Tid { get; set; } // stamm- oder wurftier-id
|
||||
public DateOnly? ReturnDate { get; set; }
|
||||
public decimal? ReturnPrice { get; set; }
|
||||
public DateOnly? OriginalSaleDate { get; set; }
|
||||
public decimal? OriginalPrice { get; set; }
|
||||
public int? AbnId { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>nachfrage_tb: Warteliste/Nachfrage (_COLOR Wunschfarbe, _SEX Wunschgeschlecht,
|
||||
/// _ABN Interessenten-Kontakt, _VOM Anfragedatum JDN, _STATUS Status, _BEM/_CODE Notiz).</summary>
|
||||
public sealed class Rpro3Nachfrage
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
public string? WishColor { get; set; }
|
||||
public Gender WishGender { get; set; }
|
||||
public int? AbnId { get; set; }
|
||||
public DateOnly? RequestedAt { get; set; }
|
||||
public string? Status { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>ausz_tb: Ausstellungsergebnis (_TID stamm-/wurftier-id, _VERANSTALTUNG Veranstaltung,
|
||||
/// _DATE Datum JDN, _ORT Ort, _PLATZ Platzierung, _AUSZ Auszeichnung, _JUROR/_EXTRA/_BEM Notiz).</summary>
|
||||
public sealed class Rpro3Ausstellung
|
||||
{
|
||||
public required int Id { get; init; }
|
||||
public string? Tid { get; set; }
|
||||
public string? EventName { get; set; }
|
||||
public DateOnly? Date { get; set; }
|
||||
public string? Place { get; set; } // _ORT
|
||||
public string? Placement { get; set; } // _PLATZ
|
||||
public string? Award { get; set; } // _AUSZ
|
||||
public string? Juror { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Vollständig geparster RPRO3-Backup-Inhalt.</summary>
|
||||
public sealed class Rpro3Data
|
||||
{
|
||||
@@ -133,6 +223,19 @@ namespace GerbilManagerWebAPI.Import.Rpro3
|
||||
public List<Rpro3Diary> Diary { get; } = new();
|
||||
public Dictionary<string, Rpro3PhotoSet> Photos { get; } = new();
|
||||
|
||||
// Feature-Tabellen.
|
||||
public List<Rpro3Becken> Becken { get; } = new();
|
||||
public List<Rpro3Acquisition> Acquisitions { get; } = new();
|
||||
public List<Rpro3Abgeben> Abgeben { get; } = new();
|
||||
public List<Rpro3Abstat> Abstat { get; } = new();
|
||||
public List<Rpro3Getback> Getback { get; } = new();
|
||||
public List<Rpro3Nachfrage> Nachfrage { get; } = new();
|
||||
public List<Rpro3Ausstellung> Ausstellungen { get; } = new();
|
||||
|
||||
/// <summary>stamm-id (string) → becken_tb.id (Gehege-Zuordnung aus stamm_tb._BECKEN).
|
||||
/// Nur positive, gültige Becken-IDs.</summary>
|
||||
public Dictionary<string, int> StammBecken { get; } = new();
|
||||
|
||||
// Roh-Zählungen (vor Dedup) für den Report.
|
||||
public int ColorStammCount { get; set; }
|
||||
public int ColorExtCount { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user