using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using MapTo; namespace BlueWest.Data { [MapFrom(new [] { typeof(CountryUpdate), typeof(CountryCreate), typeof(CountryUnique) })] public partial class Country { public int Id { get; set; } /// /// ISO 3166-1 numeric code /// public int Code { get; set; } public string Name { get; set; } /// /// ISO 3166-1 State Name /// public string StateName { get; set; } [MaxLength(2)] public string Alpha2Code { get; set; } public string TLD { get; set; } public List Currencies { get; set; } public List Users { get; set; } [JsonConstructor] public Country(string stateName, string tld, List currencies) { StateName = stateName; TLD = tld; Currencies = currencies; } public Country() { } } }