Sube carpetas API, API.Tests, Application y Domain del Backend
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Domain.Entities.Models;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Application.DTOs.Backup.Response;
|
||||
|
||||
/// <summary>
|
||||
/// Response projection of a catalogued BackupRecord, with Origin serialized as its enum name.
|
||||
/// </summary>
|
||||
public sealed record BackupRecordResponse(
|
||||
Guid Id, DateTime CreatedAt, long SizeBytes, string Origin, string StoragePath)
|
||||
{
|
||||
public static BackupRecordResponse FromEntity(BackupRecord record)
|
||||
{
|
||||
return new BackupRecordResponse(
|
||||
record.Id, record.DateCreated, record.SizeBytes, record.Origin.ToString(), record.StoragePath);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Application.DTOs.Backup.Response;
|
||||
|
||||
/// <summary>
|
||||
/// The current maintenance window; Reason and EnteredAtUtc are null when IsActive is false.
|
||||
/// </summary>
|
||||
public sealed record MaintenanceStatusResponse(bool IsActive, string? Reason, DateTimeOffset? EnteredAtUtc);
|
||||
Reference in New Issue
Block a user