Models: Add Entities/ folder
This commit is contained in:
		
							
								
								
									
										23
									
								
								Elwig/Models/Entities/Country.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Elwig/Models/Entities/Country.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
using Microsoft.EntityFrameworkCore;
 | 
			
		||||
using System.ComponentModel.DataAnnotations.Schema;
 | 
			
		||||
using IndexAttribute = Microsoft.EntityFrameworkCore.IndexAttribute;
 | 
			
		||||
 | 
			
		||||
namespace Elwig.Models.Entities {
 | 
			
		||||
    [Table("country"), PrimaryKey("Num"), Index("Alpha2", IsUnique = true), Index("Alpha3", IsUnique = true)]
 | 
			
		||||
    public class Country {
 | 
			
		||||
        [Column("num")]
 | 
			
		||||
        public int Num { get; private set; }
 | 
			
		||||
 | 
			
		||||
        [Column("alpha2")]
 | 
			
		||||
        public string Alpha2 { get; private set; }
 | 
			
		||||
 | 
			
		||||
        [Column("alpha3")]
 | 
			
		||||
        public string Alpha3 { get; private set; }
 | 
			
		||||
 | 
			
		||||
        [Column("name")]
 | 
			
		||||
        public string Name { get; private set; }
 | 
			
		||||
 | 
			
		||||
        [Column("is_visible")]
 | 
			
		||||
        public bool IsVisible { get; private set; }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user