//
using System;
using ConnectionsAPI.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ConnectionsAPI.Database.Migrations
{
[DbContext(typeof(ConnectionsContext))]
partial class ConnectionsContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCard", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CategoriesCategoryId")
.HasColumnType("INTEGER");
b.Property("Content")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Position")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CategoriesCategoryId");
b.ToTable("CategoriesCard");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CategoriesPuzzleId")
.HasColumnType("INTEGER");
b.Property("Color")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CategoriesPuzzleId");
b.ToTable("CategoriesCategory");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesPuzzle", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ContentMD5")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CreatedDate")
.HasColumnType("TEXT");
b.Property("EditorName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Index")
.HasColumnType("INTEGER");
b.Property("PrintDate")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PrintDate")
.IsUnique();
b.ToTable("CategoriesPuzzles");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCard", b =>
{
b.HasOne("ConnectionsAPI.Database.Entities.CategoriesCategory", "Category")
.WithMany("CategoriesPuzzleCards")
.HasForeignKey("CategoriesCategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Category");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
{
b.HasOne("ConnectionsAPI.Database.Entities.CategoriesPuzzle", "CategoriesPuzzle")
.WithMany("Categories")
.HasForeignKey("CategoriesPuzzleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CategoriesPuzzle");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
{
b.Navigation("CategoriesPuzzleCards");
});
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesPuzzle", b =>
{
b.Navigation("Categories");
});
#pragma warning restore 612, 618
}
}
}