using System.ComponentModel.DataAnnotations; namespace DramaLing.Api.Models.Entities; public class AudioCache { [Key] public Guid Id { get; set; } = Guid.NewGuid(); [Required] [MaxLength(64)] public string TextHash { get; set; } = string.Empty; [Required] public string TextContent { get; set; } = string.Empty; [Required] [MaxLength(2)] public string Accent { get; set; } = string.Empty; // 'us' or 'uk' [Required] [MaxLength(50)] public string VoiceId { get; set; } = string.Empty; [Required] public string AudioUrl { get; set; } = string.Empty; public int? FileSize { get; set; } public int? DurationMs { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime LastAccessed { get; set; } = DateTime.UtcNow; public int AccessCount { get; set; } = 1; }