namespace PlanTempusAdmin.Models; public class AzureContainer { public string Name { get; set; } = string.Empty; public DateTimeOffset? LastModified { get; set; } public long TotalSize { get; set; } public int BlobCount { get; set; } } public class AzureBlob { public string Name { get; set; } = string.Empty; public string? ContentType { get; set; } public long Size { get; set; } public DateTimeOffset? LastModified { get; set; } public DateTimeOffset? CreatedOn { get; set; } public string? AccessTier { get; set; } public BlobType BlobType { get; set; } // Computed public string FileName => Name.Contains('/') ? Name.Substring(Name.LastIndexOf('/') + 1) : Name; public string? Directory => Name.Contains('/') ? Name.Substring(0, Name.LastIndexOf('/')) : null; public bool IsBackup => Name.EndsWith(".tar.gz") || Name.EndsWith(".sql.gz") || Name.EndsWith(".zip") || Name.EndsWith(".bak"); } public enum BlobType { Block, Page, Append } public class AzureStorageDashboard { public bool IsConnected { get; set; } public string AccountName { get; set; } = string.Empty; // Stats public int TotalContainers { get; set; } public long TotalSize { get; set; } public int TotalBlobs { get; set; } // Containers public List Containers { get; set; } = new(); // Recent blobs public List RecentBlobs { get; set; } = new(); // Backup specific public int BackupFileCount { get; set; } public long BackupTotalSize { get; set; } public DateTimeOffset? LastBackupUpload { get; set; } } public class ContainerDetails { public string Name { get; set; } = string.Empty; public long TotalSize { get; set; } public int BlobCount { get; set; } public List Blobs { get; set; } = new(); public List Prefixes { get; set; } = new(); // Virtual directories }