This commit is contained in:
2024-08-12 17:38:02 +03:00
parent 14f9092f63
commit 5db1d1b1c5
22 changed files with 316 additions and 55 deletions

View File

@@ -0,0 +1,20 @@
using Domains.ApplicantDomain;
namespace Domains.VisaApplicationDomain
{
/// 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 DateOnly IssueDate { get; set; }
/// Name of visa
public string Name { get; set; } = null!;
/// Date when visa expires
public DateOnly ExpirationDate { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using Domains.ApplicantDomain;
namespace Domains.VisaApplicationDomain
{
/// 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 DateOnly StartDate { get; set; }
/// Last day of <see cref="PastVisit"/>
public DateOnly EndDate { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
namespace Domains.VisaApplicationDomain
{
/// Permission to enter the destination country
/// <remarks>Owned</remarks>
public class PermissionToDestCountry
{
/// Date when <see cref="PermissionToDestCountry"/> expires
public DateOnly ExpirationDate { get; set; }
/// Issuing authority
public string Issuer { get; set; } = null!;
}
}

View File

@@ -0,0 +1,12 @@
namespace Domains.VisaApplicationDomain
{
/// Permission to enter a country the issuer wants to come from
public class ReentryPermit : IEntity
{
/// Unique identifier of <see cref="PastVisa"/>
public Guid Id { get; private set; } = Guid.NewGuid();
/// Date when <see cref="ReentryPermit"/> expires
public DateOnly ExpirationDate { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using Domains.ApplicantDomain;
using Domains.Common;
namespace Domains.VisaApplicationDomain
{
/// Model of visit request
public class VisaApplication : IEntity
{
/// Unique identifier of <see cref="VisaApplication"/>
public Guid Id { get; private set; } = Guid.NewGuid();
/// 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!;
/// <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; }
public List<PastVisit> PastVisits { get; set; } = null!;
}
}