// 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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("PasswordHash") .IsRequired() .HasColumnType("text"); b.Property("Phone") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("AvatarUrl") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("CompanyName") .HasMaxLength(200) .HasColumnType("character varying(200)"); b.Property("CurrentLocation") .HasColumnType("text"); b.Property("Description") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("FirstName") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Inn") .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("LastName") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Location") .HasColumnType("text"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("IsAlwaysReady") .HasColumnType("boolean"); b.Property("WorkingDays") .HasMaxLength(2000) .HasColumnType("character varying(2000)"); b.HasKey("Id"); b.ToTable("WorkSchedules", "identity"); }); modelBuilder.Entity("UserProfileCompetencies", b => { b.Property("UserProfileId") .HasColumnType("uuid"); b.Property("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 } } }