presence/Migrations/RemoteDatabaseContextModelSnapshot.cs

116 lines
3.8 KiB
C#
Raw Normal View History

2024-11-01 19:07:13 +00:00
// <auto-generated />
using System;
using Demo.Data.RemoteData.RemoteDataBase;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Demo.Migrations
{
[DbContext(typeof(RemoteDatabaseContext))]
partial class RemoteDatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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<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("Demo.Data.RemoteData.RemoteDataBase.DAO.PresenceDAO", b =>
{
b.Property<Guid>("UserGuid")
.HasColumnType("uuid");
b.Property<DateOnly>("Date")
.HasColumnType("date");
b.Property<int>("LessonNumber")
.HasColumnType("integer");
b.Property<bool>("IsAttedance")
.HasColumnType("boolean");
b.Property<Guid>("userDAOGuid")
.HasColumnType("uuid");
b.HasKey("UserGuid", "Date", "LessonNumber");
b.HasIndex("userDAOGuid");
b.ToTable("PresenceDaos");
});
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDAO", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("FIO")
.IsRequired()
.HasColumnType("text");
b.Property<int>("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("Users")
.HasForeignKey("GroupID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Group");
});
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDAO", b =>
{
b.Navigation("Users");
});
#pragma warning restore 612, 618
}
}
}