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