203 lines
7.4 KiB
C#
203 lines
7.4 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Nashel.Modules.Identity.Infrastructure.Persistence;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Nashel.Modules.Identity.Infrastructure.Persistence.Migrations
|
|
{
|
|
[DbContext(typeof(IdentityDbContext))]
|
|
partial class IdentityDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Aggregates.Account", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(false);
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Phone")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<string>("Roles")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Phone")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Accounts", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AvatarUrl")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("CompanyName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("CurrentLocation")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("Inn")
|
|
.HasMaxLength(10)
|
|
.HasColumnType("character varying(10)");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("Location")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Patronymic")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("UserProfiles", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Entities.Competency", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique()
|
|
.HasDatabaseName("IX_Competencies_Name");
|
|
|
|
b.ToTable("Competencies", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Entities.WorkSchedule", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsAlwaysReady")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("WorkingDays")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("character varying(2000)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("WorkSchedules", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("UserProfileCompetencies", b =>
|
|
{
|
|
b.Property<Guid>("UserProfileId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("CompetencyId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("UserProfileId", "CompetencyId");
|
|
|
|
b.HasIndex("CompetencyId");
|
|
|
|
b.ToTable("UserProfileCompetencies", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", b =>
|
|
{
|
|
b.HasOne("Nashel.Modules.Identity.Domain.Aggregates.Account", null)
|
|
.WithOne("Profile")
|
|
.HasForeignKey("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", "Id")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Entities.WorkSchedule", b =>
|
|
{
|
|
b.HasOne("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", null)
|
|
.WithOne("WorkSchedule")
|
|
.HasForeignKey("Nashel.Modules.Identity.Domain.Entities.WorkSchedule", "Id")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("UserProfileCompetencies", b =>
|
|
{
|
|
b.HasOne("Nashel.Modules.Identity.Domain.Entities.Competency", null)
|
|
.WithMany()
|
|
.HasForeignKey("CompetencyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserProfileId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Aggregates.Account", b =>
|
|
{
|
|
b.Navigation("Profile")
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Identity.Domain.Aggregates.UserProfile", b =>
|
|
{
|
|
b.Navigation("WorkSchedule");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|