Changed models, added Application layer models
This commit is contained in:
		| @@ -1,20 +1,17 @@ | ||||
| using Domains.ApplicantDomain; | ||||
|  | ||||
| namespace Domains.VisaApplicationDomain | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
| /// Visa that <see cref="Applicant"/> already had | ||||
| /// <remarks>Owned</remarks> | ||||
| public class PastVisa | ||||
| { | ||||
|     /// Visa that <see cref="Applicant"/> already had | ||||
|     public class PastVisa : IEntity | ||||
|     { | ||||
|         /// Unique identifier of <see cref="PastVisa"/> | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|     /// Date of issue | ||||
|     public DateTime IssueDate { get; set; } | ||||
|  | ||||
|         /// Date of issue | ||||
|         public DateTime IssueDate { get; set; } | ||||
|     /// Name of visa | ||||
|     public string Name { get; set; } = null!; | ||||
|  | ||||
|         /// Name of visa | ||||
|         public string Name { get; set; } = null!; | ||||
|  | ||||
|         /// Date when visa expires | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|     } | ||||
|     /// Date when visa expires | ||||
|     public DateTime ExpirationDate { get; set; } | ||||
| } | ||||
|   | ||||
| @@ -1,17 +1,14 @@ | ||||
| using Domains.ApplicantDomain; | ||||
|  | ||||
| namespace Domains.VisaApplicationDomain | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
| /// Visit in a Schengen country that <see cref="Applicant"/> already had | ||||
| /// <remarks>Owned</remarks> | ||||
| public class PastVisit | ||||
| { | ||||
|     /// Visit in a Schengen country that <see cref="Applicant"/> already had | ||||
|     public class PastVisit : IEntity | ||||
|     { | ||||
|         /// Unique identifier of <see cref="PastVisit"/> | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|     /// First day of <see cref="PastVisit"/> | ||||
|     public DateTime StartDate { get; set; } | ||||
|  | ||||
|         /// First day of <see cref="PastVisit"/> | ||||
|         public DateTime StartDate { get; set; } | ||||
|  | ||||
|         /// Last day of <see cref="PastVisit"/> | ||||
|         public DateTime EndDate { get; set; } | ||||
|     } | ||||
|     /// Last day of <see cref="PastVisit"/> | ||||
|     public DateTime EndDate { get; set; } | ||||
| } | ||||
|   | ||||
| @@ -1,13 +1,12 @@ | ||||
| namespace Domains.VisaApplicationDomain | ||||
| { | ||||
|     /// Permission to enter the destination country | ||||
|     /// <remarks>Owned</remarks> | ||||
|     public class PermissionToDestCountry | ||||
|     { | ||||
|         /// Date when <see cref="PermissionToDestCountry"/> expires | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
|         /// Issuing authority | ||||
|         public string Issuer { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
| /// Permission to enter the destination country | ||||
| /// <remarks>Owned</remarks> | ||||
| public class PermissionToDestCountry | ||||
| { | ||||
|     /// Date when <see cref="PermissionToDestCountry"/> expires | ||||
|     public DateTime ExpirationDate { get; set; } | ||||
|  | ||||
|     /// Issuing authority | ||||
|     public string Issuer { get; set; } = null!; | ||||
| } | ||||
| @@ -1,13 +1,12 @@ | ||||
| namespace Domains.VisaApplicationDomain | ||||
| { | ||||
|     /// Permission to enter a country the issuer wants to come from | ||||
|     /// <remarks>Owned</remarks> | ||||
|     public class ReentryPermit | ||||
|     { | ||||
|         /// Number of <see cref="ReentryPermit"/> | ||||
|         public string Number { get; set; } = null!; | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
|         /// Date when <see cref="ReentryPermit"/> expires | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|     } | ||||
| } | ||||
| /// Permission to enter a country the issuer wants to come from | ||||
| /// <remarks>Owned</remarks> | ||||
| public class ReentryPermit | ||||
| { | ||||
|     /// Number of <see cref="ReentryPermit"/> | ||||
|     public string Number { get; set; } = null!; | ||||
|  | ||||
|     /// Date when <see cref="ReentryPermit"/> expires | ||||
|     public DateTime ExpirationDate { get; set; } | ||||
| } | ||||
| @@ -1,10 +1,9 @@ | ||||
| namespace Domains.VisaApplicationDomain | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
| /// Requested number of entries | ||||
| public enum RequestedNumberOfEntries | ||||
| { | ||||
|     /// Requested number of entries | ||||
|     public enum RequestedNumberOfEntries | ||||
|     { | ||||
|         Many, | ||||
|         One, | ||||
|         Two | ||||
|     } | ||||
| } | ||||
|     Many, | ||||
|     One, | ||||
|     Two | ||||
| } | ||||
| @@ -1,51 +1,50 @@ | ||||
| using Domains.ApplicantDomain; | ||||
| using Domains.LocationDomain; | ||||
|  | ||||
| namespace Domains.VisaApplicationDomain | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
| /// Model of visit request | ||||
| public class VisaApplication : IEntity | ||||
| { | ||||
|     /// Model of visit request | ||||
|     public class VisaApplication : IEntity | ||||
|     { | ||||
|         /// Unique identifier of <see cref="VisaApplication"/> | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|     /// Unique identifier of <see cref="VisaApplication"/> | ||||
|     public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|  | ||||
|         /// Identifier of the <see cref="Applicant"/> | ||||
|         public Guid ApplicantId { get; set; } | ||||
|     /// Identifier of the <see cref="Applicant"/> | ||||
|     public Guid ApplicantId { get; set; } | ||||
|  | ||||
|         /// Applicant of <see cref="VisaApplication"/> | ||||
|         public Applicant Applicant { get; set; } = null!; | ||||
|     /// 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; } | ||||
|     /// <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!; | ||||
|     /// <see cref="Country"/> that <see cref="Applicant"/> wants to visit | ||||
|     public Country DestinationCountry { get; set; } = null!; | ||||
|  | ||||
|         /// <summary> | ||||
|         /// List of <see cref="PastVisa"/> that applicant had before | ||||
|         /// </summary> | ||||
|         public List<PastVisa> PastVisas { get; set; } = null!; | ||||
|     /// <summary> | ||||
|     /// List of <see cref="PastVisa"/> that applicant had before | ||||
|     /// </summary> | ||||
|     public List<PastVisa> PastVisas { get; set; } = null!; | ||||
|  | ||||
|         /// Permission to enter the destination country of <see cref="Applicant"/> | ||||
|         /// <remarks>always null if <see cref="DestinationCountry"/> is Schengen</remarks> | ||||
|         public PermissionToDestCountry? PermissionToDestCountry { get; set; } | ||||
|     /// Permission to enter the destination country of <see cref="Applicant"/> | ||||
|     /// <remarks>always null if <see cref="DestinationCountry"/> is Schengen</remarks> | ||||
|     public PermissionToDestCountry? PermissionToDestCountry { get; set; } | ||||
|  | ||||
|         public List<PastVisit> PastVisits { get; set; } = null!; | ||||
|     public List<PastVisit> PastVisits { get; set; } = null!; | ||||
|  | ||||
|         /// <see cref="Domains.VisaApplicationDomain.VisaCategory"/> | ||||
|         public VisaCategory VisaCategory { get; set; } | ||||
|     /// <see cref="Domains.VisaApplicationDomain.VisaCategory"/> | ||||
|     public VisaCategory VisaCategory { get; set; } | ||||
|  | ||||
|         /// Is for group | ||||
|         public bool ForGroup { get; set; } | ||||
|     /// Is for group | ||||
|     public bool ForGroup { get; set; } | ||||
|  | ||||
|         /// <see cref="Domains.VisaApplicationDomain.RequestedNumberOfEntries"/> | ||||
|         public RequestedNumberOfEntries RequestedNumberOfEntries { get; set; } | ||||
|     /// <see cref="Domains.VisaApplicationDomain.RequestedNumberOfEntries"/> | ||||
|     public RequestedNumberOfEntries RequestedNumberOfEntries { get; set; } | ||||
|  | ||||
|         /// When application was created | ||||
|         public DateTime RequestDate { get; set; } | ||||
|     /// When application was created | ||||
|     public DateTime RequestDate { get; set; } | ||||
|  | ||||
|         /// Valid days requested | ||||
|         public int ValidDaysRequested { get; set; } | ||||
|     } | ||||
| } | ||||
|     /// Valid days requested | ||||
|     public int ValidDaysRequested { get; set; } | ||||
| } | ||||
| @@ -1,9 +1,8 @@ | ||||
| namespace Domains.VisaApplicationDomain | ||||
| namespace Domains.VisaApplicationDomain; | ||||
|  | ||||
| /// Category of visa | ||||
| public enum VisaCategory | ||||
| { | ||||
|     /// Category of visa | ||||
|     public enum VisaCategory | ||||
|     { | ||||
|         Transit, | ||||
|         ShortDated | ||||
|     } | ||||
| } | ||||
|     Transit, | ||||
|     ShortDated | ||||
| } | ||||
		Reference in New Issue
	
	Block a user