Changed domains, configured links between VisaApplication and Applicant,created generic repository and repositories for domains
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace Domains.Common
|
||||
using Domains.LocationDomain;
|
||||
|
||||
namespace Domains.ApplicantDomain
|
||||
{
|
||||
/// Model of address
|
||||
/// <remarks>Owned</remarks>
|
||||
@@ -1,4 +1,5 @@
|
||||
using Domains.Common;
|
||||
using Domains.LocationDomain;
|
||||
using Domains.VisaApplicationDomain;
|
||||
|
||||
namespace Domains.ApplicantDomain
|
||||
{
|
||||
@@ -49,5 +50,8 @@ namespace Domains.ApplicantDomain
|
||||
|
||||
/// Is <see cref="Applicant"/> a non-resident
|
||||
public bool IsNonResident { get; set; }
|
||||
|
||||
/// List of <see cref="Applicant"/>'s applications
|
||||
public List<VisaApplication> VisaApplications { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Domains.Common;
|
||||
|
||||
namespace Domains.ApplicantDomain
|
||||
namespace Domains.ApplicantDomain
|
||||
{
|
||||
public class PlaceOfWork : IEntity
|
||||
{
|
||||
@@ -10,7 +8,7 @@ namespace Domains.ApplicantDomain
|
||||
/// Name of hirer
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <see cref="Domains.Common.Address"/> of hirer
|
||||
/// <see cref="ApplicantDomain.Address"/> of hirer
|
||||
public Address Address { get; set; } = null!;
|
||||
|
||||
/// Phone number of hirer
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace Domains
|
||||
{
|
||||
/// Interface that every entity should inherit from
|
||||
public interface IEntity { }
|
||||
public interface IEntity
|
||||
{
|
||||
public Guid Id { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Domains.Common
|
||||
namespace Domains.LocationDomain
|
||||
{
|
||||
/// Model of a city
|
||||
public class City : IEntity
|
||||
@@ -9,7 +9,7 @@
|
||||
/// Name of the city
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <see cref="Domains.Common.Country"/> in which the city is located
|
||||
/// <see cref="LocationDomain.Country"/> in which the city is located
|
||||
public Country Country { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Domains.Common
|
||||
namespace Domains.LocationDomain
|
||||
{
|
||||
/// Model of a country
|
||||
public class Country : IEntity
|
||||
@@ -1,5 +1,6 @@
|
||||
using Domains.ApplicantDomain;
|
||||
using Domains.Common;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Domains.ApplicantDomain;
|
||||
using Domains.LocationDomain;
|
||||
|
||||
namespace Domains.VisaApplicationDomain
|
||||
{
|
||||
@@ -9,8 +10,11 @@ namespace Domains.VisaApplicationDomain
|
||||
/// 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; }
|
||||
|
||||
/// Applicant of <see cref="VisaApplication"/>
|
||||
public Applicant Applicant { get; set; } = null!;
|
||||
public Applicant Applicant { get; set; }
|
||||
|
||||
/// <inheritdoc cref="Domains.VisaApplicationDomain.ReentryPermit"/>
|
||||
/// <remarks>always null if <see cref="Applicant"/> is not a non-resident</remarks>
|
||||
|
||||
Reference in New Issue
Block a user