136 lines
4.6 KiB
C#
136 lines
4.6 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using ConnectionsAPI.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace ConnectionsAPI.Database.Migrations
|
|
{
|
|
[DbContext(typeof(ConnectionsContext))]
|
|
[Migration("20241226082514_RenameCategoriesPuzzles")]
|
|
partial class RenameCategoriesPuzzles
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCard", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("CategoriesCategoryId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Position")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CategoriesCategoryId");
|
|
|
|
b.ToTable("CategoriesCard");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("CategoriesPuzzleId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Color")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CategoriesPuzzleId");
|
|
|
|
b.ToTable("CategoriesCategory");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesPuzzle", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ContentMD5")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("EditorName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Index")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("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
|
|
}
|
|
}
|
|
}
|