Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled
- Implemented CreateInstanceView for creating new instances. - Added HostsView for managing SSH hosts with CRUD operations. - Created InstancesView for displaying and managing instances. - Developed LogsView for viewing operation logs. - Introduced SecretsView for managing secrets associated with hosts. - Established SettingsView for configuring application settings. - Created MainWindow as the main application window with navigation. - Added app manifest and configuration files for logging and settings.
49 lines
1008 B
C#
49 lines
1008 B
C#
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;
|
|
|
|
/// <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;
|
|
}
|