| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.ComponentModel.DataAnnotations; |
| | 4 | | using System.Linq; |
| | 5 | | using System.Text.Json.Serialization; |
| | 6 | | using System.Threading.Tasks; |
| | 7 | | using Microsoft.VisualBasic.CompilerServices; |
| | 8 | | using MUNity.Base; |
| | 9 | |
|
| | 10 | | namespace MUNity.Database.General; |
| | 11 | |
|
| | 12 | | /// <summary> |
| | 13 | | /// a country is one of the countries of the United Nations |
| | 14 | | /// |
| | 15 | | /// https://www.worldometers.info/united-nations/ |
| | 16 | | /// </summary> |
| | 17 | | public class Country |
| | 18 | | { |
| | 19 | |
|
| 621 | 20 | | public short CountryId { get; set; } |
| | 21 | |
|
| 416 | 22 | | public EContinent Continent { get; set; } |
| | 23 | |
|
| | 24 | | [MaxLength(250)] |
| 8278 | 25 | | public string Name { get; set; } |
| | 26 | |
|
| | 27 | | [MaxLength(350)] |
| 7789 | 28 | | public string FullName { get; set; } |
| | 29 | |
|
| | 30 | | [MaxLength(3)] |
| 700 | 31 | | public string Iso { get; set; } |
| | 32 | |
|
| 414 | 33 | | public bool IsAccredited { get; set; } |
| | 34 | |
|
| 828 | 35 | | public ICollection<CountryNameTranslation> Translations { get; set; } |
| | 36 | |
|
| 413 | 37 | | public Country(short id, EContinent continent, string name, string fullName, string iso, bool isAccredited = true) |
| 413 | 38 | | { |
| 413 | 39 | | this.CountryId = id; |
| 413 | 40 | | this.Continent = continent; |
| 413 | 41 | | this.Name = name; |
| 413 | 42 | | this.FullName = fullName; |
| 413 | 43 | | this.Iso = iso; |
| 413 | 44 | | this.IsAccredited = isAccredited; |
| 413 | 45 | | this.Translations = new List<CountryNameTranslation>(); |
| 413 | 46 | | } |
| | 47 | |
|
| 0 | 48 | | public Country(EContinent continent, string name, string fullName, string iso, bool isAccredited = true) |
| 0 | 49 | | { |
| 0 | 50 | | this.Continent = continent; |
| 0 | 51 | | this.Name = name; |
| 0 | 52 | | this.FullName = fullName; |
| 0 | 53 | | this.Iso = iso; |
| 0 | 54 | | this.IsAccredited = isAccredited; |
| 0 | 55 | | this.Translations = new List<CountryNameTranslation>(); |
| 0 | 56 | | } |
| | 57 | |
|
| 2 | 58 | | public Country() |
| 2 | 59 | | { |
| 2 | 60 | | this.Translations = new List<CountryNameTranslation>(); |
| 2 | 61 | | } |
| | 62 | | } |