// using System; using Data.RemoteData.RemoteDataBase.DAO; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Demo.Migrations { [DbContext(typeof(RemoteDatabaseContext))] [Migration("20241024202926_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Groups"); }); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.PresenceDao", b => { b.Property("UserGuid") .HasColumnType("uuid"); b.Property("Date") .HasColumnType("date"); b.Property("IsAttedance") .HasColumnType("boolean"); b.Property("LessonNumber") .HasColumnType("integer"); b.Property("userDaoGuid") .HasColumnType("uuid"); b.HasKey("UserGuid", "Date", "IsAttedance", "LessonNumber"); b.HasIndex("userDaoGuid"); b.ToTable("PresenceDaos"); }); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b => { b.Property("Guid") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("FIO") .IsRequired() .HasColumnType("text"); b.Property("GroupID") .HasColumnType("integer"); b.HasKey("Guid"); b.HasIndex("GroupID"); b.ToTable("Users"); }); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.PresenceDao", b => { b.HasOne("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", "userDao") .WithMany() .HasForeignKey("userDaoGuid") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("userDao"); }); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b => { b.HasOne("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", "Group") .WithMany("User") .HasForeignKey("GroupID") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); }); modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b => { b.Navigation("User"); }); #pragma warning restore 612, 618 } } }