Changed models, added Application layer models

This commit is contained in:
2024-08-15 14:54:23 +03:00
parent 1d8405b4ec
commit c1a4acf414
50 changed files with 628 additions and 647 deletions

View File

@@ -2,26 +2,25 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Infrastructure.Database.Applicants.Configuration
namespace Infrastructure.Database.Applicants.Configuration;
public class ApplicantConfiguration : IEntityTypeConfiguration<Applicant>
{
public class ApplicantConfiguration : IEntityTypeConfiguration<Applicant>
public void Configure(EntityTypeBuilder<Applicant> entity)
{
public void Configure(EntityTypeBuilder<Applicant> entity)
{
entity.ToTable("Applicants");
entity.ToTable("Applicants");
entity.OwnsOne(p => p.Name);
entity.OwnsOne(p => p.FatherName);
entity.OwnsOne(p => p.MotherName);
entity.OwnsOne(p => p.Passport);
entity.OwnsOne(p => p.Name);
entity.OwnsOne(p => p.FatherName);
entity.OwnsOne(p => p.MotherName);
entity.OwnsOne(p => p.Passport);
entity.Property(p => p.Citizenship)
.IsUnicode(false)
.HasMaxLength(30);
entity.Property(p => p.Citizenship)
.IsUnicode(false)
.HasMaxLength(30);
entity.Property(p => p.CitizenshipByBirth)
.IsUnicode(false)
.HasMaxLength(30);
}
entity.Property(p => p.CitizenshipByBirth)
.IsUnicode(false)
.HasMaxLength(30);
}
}
}