using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using WatchIt.Common.Query; namespace WatchIt.Common.Model.Genres; public class GenreResponse : Genre, IQueryOrderable { #region PROPERTIES [JsonIgnore] public static IDictionary> OrderableProperties { get; } = new Dictionary> { { "id", x => x.Id }, { "name", x => x.Name } }; [JsonPropertyName("id")] public short Id { get; set; } #endregion #region CONSTRUCTORS [JsonConstructor] public GenreResponse() {} [SetsRequiredMembers] public GenreResponse(Database.Model.Common.Genre genre) { Id = genre.Id; Name = genre.Name; } #endregion }