using System; using System.ComponentModel.DataAnnotations; namespace ManagerService.Data { public class ApiKey { [Key] public string Id { get; set; } /// Plain text key — only for PIN-bootstrapped keys (re-retrievable) public string? Key { get; set; } /// SHA-256 hash — for manually created keys (returned plain text only once) public string? KeyHash { get; set; } [Required] public string Name { get; set; } [Required] public string InstanceId { get; set; } public Instance Instance { get; set; } public ApiKeyAppType AppType { get; set; } public bool IsActive { get; set; } = true; public DateTime DateCreation { get; set; } public DateTime? DateExpiration { get; set; } } }