using OmsorgCore.Domain.Common;

namespace OmsorgCore.Domain.Entities;

/// <summary>
/// Core-Objekt "Rechnung" — entsteht ausschließlich aus freigegebener Zeiterfassung + Konditionen
/// der Einrichtung (REQUIREMENTS.md Abschnitt 6, Blueprint 19.6, Regel FR-RE-1/FR-ZE-3).
/// </summary>
public class Invoice : AuditableEntity
{
    public string InvoiceNumber { get; set; } = string.Empty;

    public Guid FacilityId { get; set; }
    public Facility Facility { get; set; } = null!;

    public DateOnly BillingPeriodStart { get; set; }
    public DateOnly BillingPeriodEnd { get; set; }

    public decimal NetAmount { get; set; }
    public decimal GrossAmount { get; set; }

    public string Status { get; set; } = "Entwurf";
    public DateOnly? DueDate { get; set; }
}
