Removed location entities, fixed configurations and controllers' comments

This commit is contained in:
2024-08-21 18:39:22 +03:00
parent f857ba90f8
commit 3e21a0a164
47 changed files with 111 additions and 506 deletions

View File

@@ -1,20 +1,18 @@
using Domains.LocationDomain;
namespace Domains.ApplicantDomain;
namespace Domains.ApplicantDomain;
/// Model of address
/// <remarks>Owned</remarks>
public class Address
{
/// Country part of address
public Country Country { get; set; } = null!;
public string Country { get; set; } = null!;
/// City part of address
public City City { get; set; } = null!;
public string City { get; set; } = null!;
/// Street part of address
public string Street { get; set; } = null!;
/// Building part of address
public string Building { get; set; } = null!;
}
}

View File

@@ -1,6 +1,4 @@
using Domains.LocationDomain;
namespace Domains.ApplicantDomain;
namespace Domains.ApplicantDomain;
/// Model of an applicant
public class Applicant : IEntity
@@ -19,11 +17,11 @@ public class Applicant : IEntity
/// Date of birth of the <see cref="Applicant"/>
public DateTime BirthDate { get; set; }
/// <see cref="Country"/> of birth of the <see cref="Applicant"/>
public Country CountryOfBirth { get; set; } = null!;
/// Country of birth of the <see cref="Applicant"/>
public string CountryOfBirth { get; set; } = null!;
/// <see cref="City"/> of birth of the <see cref="Applicant"/>
public City CityOfBirth { get; set; } = null!;
/// City of birth of the <see cref="Applicant"/>
public string CityOfBirth { get; set; } = null!;
/// Citizenship of <see cref="Applicant"/>
public string Citizenship { get; set; } = null!;

View File

@@ -1,17 +0,0 @@
using System.Text.Json.Serialization;
namespace Domains.LocationDomain;
/// Model of a city
public class City : IEntity
{
/// Unique identifier of the <see cref="City"/>
public Guid Id { get; private set; } = Guid.NewGuid();
/// Name of the city
public string Name { get; set; } = null!;
/// <see cref="LocationDomain.Country"/> in which the city is located
[JsonIgnore]
public Country Country { get; set; } = null!;
}

View File

@@ -1,17 +0,0 @@
namespace Domains.LocationDomain;
/// Model of a country
public class Country : IEntity
{
/// Unique identifier of the <see cref="Country"/>
public Guid Id { get; private set; } = Guid.NewGuid();
/// 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!;
}

View File

@@ -1,5 +1,4 @@
using Domains.ApplicantDomain;
using Domains.LocationDomain;
namespace Domains.VisaApplicationDomain;
@@ -14,5 +13,5 @@ public class PastVisit
public DateTime EndDate { get; set; }
/// Destination country of <see cref="PastVisit"/>
public Country DestinationCountry { get; set; } = null!;
public string DestinationCountry { get; set; } = null!;
}

View File

@@ -1,5 +1,4 @@
using Domains.ApplicantDomain;
using Domains.LocationDomain;
namespace Domains.VisaApplicationDomain;
@@ -12,15 +11,12 @@ public class VisaApplication : IEntity
/// Identifier of the <see cref="Applicant"/>
public Guid ApplicantId { get; set; }
/// Applicant of <see cref="VisaApplication"/>
public Applicant Applicant { get; set; } = null!;
/// <inheritdoc cref="Domains.VisaApplicationDomain.ReentryPermit"/>
/// <remarks>always null if <see cref="Applicant"/> is not a non-resident</remarks>
public ReentryPermit? ReentryPermit { get; set; }
/// <see cref="Country"/> that <see cref="Applicant"/> wants to visit
public Country DestinationCountry { get; set; } = null!;
/// Country that <see cref="Applicant"/> wants to visit
public string DestinationCountry { get; set; } = null!;
/// <summary>
/// List of <see cref="PastVisa"/> that applicant had before
@@ -47,4 +43,4 @@ public class VisaApplication : IEntity
/// Valid days requested
public int ValidDaysRequested { get; set; }
}
}