using System.ComponentModel.DataAnnotations;
namespace GerbilManagerWebAPI.Models
{
///
/// ERWERB: how/when an animal was acquired (purchase date, price, note) — sourced from
/// RennmausPro's herktier_tb (_TID/_DATE/_PRICE/_BEM). The seller is already linked
/// via Gerbil.OriginContactId; this record adds the date/price/note around that.
///
/// Decoupled from the rest of the model ON PURPOSE — GerbilId/SourceContactId are plain
/// nullable Guid columns (NOT enforced foreign keys), so the import re-ingest wipe
/// (IngestResolvedService, which deletes Gerbils/Contacts) never cascades into — or
/// breaks — acquisition rows. They survive re-ingest, mirroring the Feedback pattern.
///
public class AcquisitionRecord
{
[Key]
public Guid Id { get; set; }
/// Loose reference (no FK) to the acquired gerbil.
public Guid? GerbilId { get; set; }
/// Loose reference (no FK) to the source/seller contact, if known.
public Guid? SourceContactId { get; set; }
/// When the animal was acquired (purchase date).
public DateOnly? Date { get; set; }
/// Acquisition price (purchase cost), if recorded.
public decimal? Price { get; set; }
/// Free-text note about the acquisition.
public string? Note { get; set; }
/// Server-side creation time.
public DateTimeOffset CreatedAt { get; set; }
}
}