using OmsorgCore.Domain.Common;

namespace OmsorgCore.Domain.Entities;

/// <summary>
/// Core-Objekt "Zeiterfassung" — geleistete Arbeitszeit eines Mitarbeiters innerhalb eines Auftrags
/// (REQUIREMENTS.md Abschnitt 6, Blueprint 19.5). Nur freigegebene Einträge (Status "Freigegeben")
/// dürfen in die Rechnungserstellung einfließen (FR-ZE-3).
/// </summary>
public class TimeEntry : AuditableEntity
{
    public Guid EmployeeId { get; set; }
    public Employee Employee { get; set; } = null!;

    public Guid OrderId { get; set; }
    public Order Order { get; set; } = null!;

    public DateOnly Date { get; set; }
    public TimeOnly Start { get; set; }
    public TimeOnly End { get; set; }
    public TimeSpan BreakDuration { get; set; }

    public decimal NightHours { get; set; }
    public decimal SaturdayHours { get; set; }
    public decimal SundayHours { get; set; }
    public decimal HolidayHours { get; set; }

    public Guid StatusId { get; set; }
    public ValueListItem Status { get; set; } = null!;
    public string? AdminNote { get; set; }
}
