Models
This commit is contained in:
		
							
								
								
									
										19
									
								
								SchengenVisaApi/Domains/Common/Address.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								SchengenVisaApi/Domains/Common/Address.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| namespace Domains.Common | ||||
| { | ||||
|     /// Model of address | ||||
|     /// <remarks>Owned</remarks> | ||||
|     public class Address | ||||
|     { | ||||
|         /// Country part of address | ||||
|         public Country Country { get; set; } = null!; | ||||
|  | ||||
|         /// City part of address | ||||
|         public City City { get; set; } = null!; | ||||
|  | ||||
|         /// Street part of address | ||||
|         public string Street { get; set; } = null!; | ||||
|  | ||||
|         /// Building part of address | ||||
|         public string Building { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								SchengenVisaApi/Domains/Common/City.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								SchengenVisaApi/Domains/Common/City.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| namespace Domains.Common | ||||
| { | ||||
|     /// Model of a city | ||||
|     public class City : IEntity | ||||
|     { | ||||
|         /// Unique identifier of the city | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|  | ||||
|         /// Name of the city | ||||
|         public string Name { get; set; } = null!; | ||||
|  | ||||
|         /// <see cref="Domains.Common.Country"/> in which the city is located | ||||
|         public Country Country { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								SchengenVisaApi/Domains/Common/Country.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								SchengenVisaApi/Domains/Common/Country.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| namespace Domains.Common | ||||
| { | ||||
|     /// Model of a country | ||||
|     public class Country : IEntity | ||||
|     { | ||||
|         /// Name of the country | ||||
|         public string Name { get; set; } = null!; | ||||
|  | ||||
|         /// Located in Schengen area | ||||
|         public bool IsSchengen { get; set; } | ||||
|  | ||||
|         /// List of <see cref="City"/> that country have | ||||
|         public List<City> Cities { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user