Files
PLDpro.Web/Models/UI/DocumentModels.cs
Erik cae77ef1e3
All checks were successful
Build & Deploy PLDpro.Web Test to 192.168.1.100 / build-and-deploy (push) Successful in 1m15s
DMS Layout mit Fehlern
2026-02-09 21:50:24 +01:00

20 lines
833 B
C#

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; }
}