CodeLiturgy.Dashboard/BlueWest.Data/Country/Country.cs

35 lines
820 B
C#
Raw Normal View History

2022-08-17 23:21:00 +03:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using MapTo;
2022-08-13 05:59:37 +03:00
2022-08-17 23:21:00 +03:00
namespace BlueWest.Data
2022-08-13 05:59:37 +03:00
{
2022-08-17 23:21:00 +03:00
2022-08-18 18:01:39 +03:00
[MapFrom(new [] {typeof(CountryUpdate), typeof(CountryCreate)})]
2022-08-17 23:21:00 +03:00
public partial class Country
2022-08-13 20:15:43 +03:00
{
2022-08-17 23:21:00 +03:00
// ISO 3166-1 numeric code
public int Code { get; set; } // Primary key
public string StateName { get; set; }
2022-08-13 20:15:43 +03:00
2022-08-17 23:21:00 +03:00
[MaxLength(2)] public string Alpha2Code { get; set; }
public string TLD { get; set; }
public List<Currency> Currencies { get; set; }
public Country(int code, string stateName, string tld, List<Currency> currencies)
{
Code = code;
StateName = stateName;
TLD = tld;
Currencies = currencies;
}
public Country()
{
2022-08-13 20:15:43 +03:00
2022-08-17 23:21:00 +03:00
}
}
}