426 lines
15 KiB
C#
426 lines
15 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Mirea.Api.DataAccess.Persistence;
|
|
|
|
#nullable disable
|
|
|
|
namespace MysqlMigrations.Migrations
|
|
{
|
|
[DbContext(typeof(UberDbContext))]
|
|
[Migration("20241027034820_RemoveUnusedRef")]
|
|
partial class RemoveUnusedRef
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.10")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Campus", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasMaxLength(512)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("CodeName")
|
|
.IsRequired()
|
|
.HasMaxLength(16)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FullName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Campus", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Discipline", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Discipline", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Faculty", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Faculty", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Group", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("FacultyId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("FacultyId");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Group", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.LectureHall", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CampusId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CampusId");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("LectureHall", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Lesson", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("DayOfWeek")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("DisciplineId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("GroupId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool>("IsEven")
|
|
.HasColumnType("BOOLEAN");
|
|
|
|
b.Property<bool?>("IsExcludedWeeks")
|
|
.HasColumnType("BOOLEAN");
|
|
|
|
b.Property<int>("PairNumber")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DisciplineId");
|
|
|
|
b.HasIndex("GroupId");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Lesson", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.LessonAssociation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("LectureHallId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("LessonId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("LinkToMeet")
|
|
.HasMaxLength(512)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("ProfessorId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("TypeOfOccupationId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("LectureHallId");
|
|
|
|
b.HasIndex("LessonId");
|
|
|
|
b.HasIndex("ProfessorId");
|
|
|
|
b.HasIndex("TypeOfOccupationId");
|
|
|
|
b.ToTable("LessonAssociation", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Professor", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AltName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Professor", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.SpecificWeek", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("LessonId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("WeekNumber")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("LessonId");
|
|
|
|
b.ToTable("SpecificWeek", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.TypeOfOccupation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ShortName")
|
|
.IsRequired()
|
|
.HasMaxLength(16)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("TypeOfOccupation", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Group", b =>
|
|
{
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Faculty", "Faculty")
|
|
.WithMany("Groups")
|
|
.HasForeignKey("FacultyId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.Navigation("Faculty");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.LectureHall", b =>
|
|
{
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Campus", "Campus")
|
|
.WithMany("LectureHalls")
|
|
.HasForeignKey("CampusId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Campus");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Lesson", b =>
|
|
{
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Discipline", "Discipline")
|
|
.WithMany("Lessons")
|
|
.HasForeignKey("DisciplineId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Group", "Group")
|
|
.WithMany("Lessons")
|
|
.HasForeignKey("GroupId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Discipline");
|
|
|
|
b.Navigation("Group");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.LessonAssociation", b =>
|
|
{
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.LectureHall", "LectureHall")
|
|
.WithMany("LessonAssociations")
|
|
.HasForeignKey("LectureHallId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Lesson", "Lesson")
|
|
.WithMany("LessonAssociations")
|
|
.HasForeignKey("LessonId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Professor", "Professor")
|
|
.WithMany("LessonAssociations")
|
|
.HasForeignKey("ProfessorId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.TypeOfOccupation", "TypeOfOccupation")
|
|
.WithMany("Lessons")
|
|
.HasForeignKey("TypeOfOccupationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("LectureHall");
|
|
|
|
b.Navigation("Lesson");
|
|
|
|
b.Navigation("Professor");
|
|
|
|
b.Navigation("TypeOfOccupation");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.SpecificWeek", b =>
|
|
{
|
|
b.HasOne("Mirea.Api.DataAccess.Domain.Schedule.Lesson", "Lesson")
|
|
.WithMany("SpecificWeeks")
|
|
.HasForeignKey("LessonId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Lesson");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Campus", b =>
|
|
{
|
|
b.Navigation("LectureHalls");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Discipline", b =>
|
|
{
|
|
b.Navigation("Lessons");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Faculty", b =>
|
|
{
|
|
b.Navigation("Groups");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Group", b =>
|
|
{
|
|
b.Navigation("Lessons");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.LectureHall", b =>
|
|
{
|
|
b.Navigation("LessonAssociations");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Lesson", b =>
|
|
{
|
|
b.Navigation("LessonAssociations");
|
|
|
|
b.Navigation("SpecificWeeks");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.Professor", b =>
|
|
{
|
|
b.Navigation("LessonAssociations");
|
|
});
|
|
|
|
modelBuilder.Entity("Mirea.Api.DataAccess.Domain.Schedule.TypeOfOccupation", b =>
|
|
{
|
|
b.Navigation("Lessons");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|