namespace Modules.Library.Domain.Entities; public class MediaInfo : ValueObject { public MediaInfoType Type { get; private set; } = MediaInfoType.OtherFile; public string ContentType { get; private set; } = default!; public string Url { get; private set; } = default!; public MediaInfo(string url, MediaInfoType type, string contentType) { Url = url.Trim(); Type = type; ContentType = contentType.Trim().ToLower(); } internal void SetUrl(string value) { Url = value.Trim(); } internal void SetType(MediaInfoType value) { Type = value; } internal void SetContentType(string contentType) { ContentType = contentType.Trim(); } protected override IEnumerable GetEqualityComponents() { yield return Type; yield return ContentType; yield return Url; } }