[CHANGE] Updated string maxsize on entities. Setup lib dbcontext

This commit is contained in:
max
2025-08-17 18:54:20 +02:00
parent 7f7e137a92
commit b6453d8bf6
12 changed files with 168 additions and 18 deletions

View File

@@ -1,12 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace Manager.Data.Models.LibraryContext;
public class MediaFormatEntity
{
// Id = <contentid>_<itag> example: 58Gh4dE_123
public required string Id { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public required string MediaId { get; set; }
public required int Itag { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public string? Quality { get; set; }
public bool IsAdaptive { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public string? MimeType { get; set; }
public long Bitrate { get; set; }
public long AverageBitrate { get; set; }
@@ -16,8 +20,10 @@ public class MediaFormatEntity
public int? Width { get; set; }
public int? Height { get; set; }
public double? Framerate { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public string? QualityLabel { get; set; }
public int? AudioChannels { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public string? AudioSampleRate { get; set; }
public double? LoudnessDb { get; set; }
}