Perepis/data/Migrations/RemoteDataBaseContextModelSnapshot.cs

116 lines
3.7 KiB
C#
Raw Permalink Normal View History

2024-11-08 08:08:54 +00:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using data.RemoteData;
#nullable disable
namespace data.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("Data.RemoteData.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("Group");
});
modelBuilder.Entity("Data.RemoteData.DAO.PresenceDao", b =>
{
b.Property<Guid>("UserGuid")
.HasColumnType("uuid");
b.Property<bool>("IsAttedance")
.HasColumnType("boolean");
b.Property<DateOnly>("Date")
.HasColumnType("date");
b.Property<int>("LessonNumber")
.HasColumnType("integer");
b.Property<Guid>("UserDaoGuid")
.HasColumnType("uuid");
b.HasKey("UserGuid", "IsAttedance", "Date", "LessonNumber");
b.HasIndex("UserDaoGuid");
b.ToTable("Presence");
});
modelBuilder.Entity("Data.RemoteData.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("User");
});
modelBuilder.Entity("Data.RemoteData.DAO.PresenceDao", b =>
{
b.HasOne("Data.RemoteData.DAO.UserDao", "UserDao")
.WithMany()
.HasForeignKey("UserDaoGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("UserDao");
});
modelBuilder.Entity("Data.RemoteData.DAO.UserDao", b =>
{
b.HasOne("Data.RemoteData.DAO.GroupDao", "Group")
.WithMany("Users")
.HasForeignKey("GroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Group");
});
modelBuilder.Entity("Data.RemoteData.DAO.GroupDao", b =>
{
b.Navigation("Users");
});
#pragma warning restore 612, 618
}
}
}