Files
OTSSignsOrchestrator/OTSSignsOrchestrator.Core/Models/Entities/OperationLog.cs
Matt Batchelder adf1a2e4db
Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled
Add WAL file for database and log instance deployment failures
2026-02-19 08:27:54 -05:00

47 lines
995 B
C#

using System.ComponentModel.DataAnnotations;
namespace OTSSignsOrchestrator.Core.Models.Entities;
public enum OperationType
{
Create,
Update,
Delete,
TestXibo,
TestIdP,
DeploymentStatus,
Other
}
public enum OperationStatus
{
Pending,
Success,
Failure
}
public class OperationLog
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
public OperationType Operation { get; set; }
/// <summary>Name of the Docker stack this operation relates to (e.g. "acm-cms-stack").</summary>
[MaxLength(150)]
public string? StackName { get; set; }
[MaxLength(200)]
public string? UserId { get; set; }
public OperationStatus Status { get; set; } = OperationStatus.Pending;
/// <summary>Human-readable message. NEVER includes secret values.</summary>
[MaxLength(2000)]
public string? Message { get; set; }
public long? DurationMs { get; set; }
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
}