presence/Data/Migrations/20241206081508_InitialCreate.Designer.cs
Class_Student e771fe1659 new
2024-12-06 11:51:13 +03:00

119 lines
4.1 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using presence.Data.RemoteData.RemoteDatabase;
#nullable disable
namespace Data.Migrations
{
[DbContext(typeof(RemoteDatabaseContext))]
[Migration("20241206081508_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
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("presence.Data.RemoteData.RemoteDatabase.DAO.GroupDao", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("ID"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("Groups");
});
modelBuilder.Entity("presence.Data.RemoteData.RemoteDatabase.DAO.PresenceDao", b =>
{
b.Property<int>("UserDaoUserId")
.HasColumnType("integer");
b.Property<DateOnly>("Date")
.HasColumnType("date");
b.Property<bool>("IsAttedance")
.HasColumnType("boolean");
b.Property<int>("LessonNumber")
.HasColumnType("integer");
b.Property<int>("GroupId")
.HasColumnType("integer");
b.HasKey("UserDaoUserId", "Date", "IsAttedance", "LessonNumber");
b.ToTable("PresencesDaos");
});
modelBuilder.Entity("presence.Data.RemoteData.RemoteDatabase.DAO.UserDao", b =>
{
b.Property<int>("UserID")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserID"));
b.Property<int>("GroupID")
.HasColumnType("integer");
b.Property<string>("UserFIO")
.IsRequired()
.HasColumnType("text");
b.HasKey("UserID");
b.HasIndex("GroupID");
b.ToTable("Users");
});
modelBuilder.Entity("presence.Data.RemoteData.RemoteDatabase.DAO.PresenceDao", b =>
{
b.HasOne("presence.Data.RemoteData.RemoteDatabase.DAO.UserDao", "UserDao")
.WithMany()
.HasForeignKey("UserDaoUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("UserDao");
});
modelBuilder.Entity("presence.Data.RemoteData.RemoteDatabase.DAO.UserDao", b =>
{
b.HasOne("presence.Data.RemoteData.RemoteDatabase.DAO.GroupDao", "Group")
.WithMany("Users")
.HasForeignKey("GroupID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Group");
});
modelBuilder.Entity("presence.Data.RemoteData.RemoteDatabase.DAO.GroupDao", b =>
{
b.Navigation("Users");
});
#pragma warning restore 612, 618
}
}
}