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

35 lines
820 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using MapTo;
namespace BlueWest.Data
{
[MapFrom(new [] {typeof(CountryUpdate), typeof(CountryCreate)})]
public partial class Country
{
// ISO 3166-1 numeric code
public int Code { get; set; } // Primary key
public string StateName { get; set; }
[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()
{
}
}
}