namespace Pldpro.Web.UI.Models; public enum DocumentStatus { Eingegangen, Freigegeben, Bezahlt } public class DocumentListItem { public string Bucket { get; set; } = string.Empty; public string Key { get; set; } = string.Empty; // z.B. "rechnungen/2026/INV-123.pdf" public string FileName => Key.Split('/', StringSplitOptions.RemoveEmptyEntries).LastOrDefault() ?? Key; public long? Size { get; set; } public DateTime? LastModified { get; set; } public DocumentStatus Status { get; set; } = DocumentStatus.Eingegangen; // (UI-only) public string PathPrefix => Key.Contains('/') ? string.Join('/', Key.Split('/').SkipLast(1)) : string.Empty; } public sealed class DocumentDetail : DocumentListItem { // Platzhalter für spätere Rechnungsfelder public string? Notes { get; set; } }