- Additive migration: Gerbil.RawImportData + Litter.PairingCode (Zuchtnummer der Verpaarung). - ImportService consumes tools/import/output (animals.json + litters.json): litters first (authoritative), then conflict-free animals with a DOB; high-confidence (hoch) litter links set LitterId, date-only/ambiguous links quarantined; conflicts + stubs never loaded. Genotype mapped8locus -> frozen compact string; rawGenotype+unmappedTokens preserved in RawImportData; Farbschlag matched to ColorVariety; gender inferred from litter role; provenance ImportSource/ExternalRef; idempotent (ExternalRef / Name+Date). Photos copied to store. - ImportEndpoints: POST /import/dry-run (no writes, Julian-readable report) + /import/execute (gated).
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace GerbilManagerWebAPI.Models
|
|
{
|
|
/// <summary>A litter (Wurf). Parents are gerbils; juveniles are Gerbils linked via Gerbil.LitterId.</summary>
|
|
public class Litter
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; }
|
|
public required string Name { get; set; }
|
|
public DateOnly Date { get; set; }
|
|
|
|
/// <summary>Total born count (was "Strength").</summary>
|
|
public int? TotalBorn { get; set; }
|
|
|
|
public Guid? FatherId { get; set; }
|
|
public Gerbil? Father { get; set; }
|
|
public Guid? MotherId { get; set; }
|
|
public Gerbil? Mother { get; set; }
|
|
|
|
/// <summary>Computed ~35 days after Date by default; editable.</summary>
|
|
public DateOnly? ExpectedGoHomeDate { get; set; }
|
|
public string? Notes { get; set; }
|
|
|
|
/// <summary>Zuchtnummer der Verpaarung (Wurfchronik col H) — pairing-level code;
|
|
/// litters sharing it are the same Zuchtpaar. Set by the FEAT-8 import.</summary>
|
|
public string? PairingCode { get; set; }
|
|
}
|
|
}
|