2026-02-12 15:24:25 -05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
2026-02-18 10:43:27 -05:00
|
|
|
namespace OTSSignsOrchestrator.Core.Models.Entities;
|
2026-02-12 15:24:25 -05:00
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
|
|
public Guid? InstanceId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(InstanceId))]
|
|
|
|
|
public CmsInstance? Instance { get; set; }
|
|
|
|
|
|
|
|
|
|
[MaxLength(200)]
|
|
|
|
|
public string? UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
public OperationStatus Status { get; set; } = OperationStatus.Pending;
|
|
|
|
|
|
2026-02-18 10:43:27 -05:00
|
|
|
/// <summary>Human-readable message. NEVER includes secret values.</summary>
|
2026-02-12 15:24:25 -05:00
|
|
|
[MaxLength(2000)]
|
|
|
|
|
public string? Message { get; set; }
|
|
|
|
|
|
|
|
|
|
public long? DurationMs { get; set; }
|
|
|
|
|
|
|
|
|
|
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
|
|
|
|
|
}
|