using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; 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; } 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; /// Human-readable message. NEVER includes secret values. [MaxLength(2000)] public string? Message { get; set; } public long? DurationMs { get; set; } public DateTime Timestamp { get; set; } = DateTime.UtcNow; }