136 lines
4.4 KiB
C#
136 lines
4.4 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("20240416121538_Initial")]
|
|
partial class Initial
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.Puzzle", 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("Puzzles");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCard", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Position")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("PuzzleCategoryId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PuzzleCategoryId");
|
|
|
|
b.ToTable("PuzzleCard");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Color")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("PuzzleId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PuzzleId");
|
|
|
|
b.ToTable("PuzzleCategory");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCard", b =>
|
|
{
|
|
b.HasOne("ConnectionsAPI.Database.Entities.PuzzleCategory", "PuzzleCategory")
|
|
.WithMany("PuzzleCards")
|
|
.HasForeignKey("PuzzleCategoryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("PuzzleCategory");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b =>
|
|
{
|
|
b.HasOne("ConnectionsAPI.Database.Entities.Puzzle", "Puzzle")
|
|
.WithMany("Categories")
|
|
.HasForeignKey("PuzzleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Puzzle");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.Puzzle", b =>
|
|
{
|
|
b.Navigation("Categories");
|
|
});
|
|
|
|
modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b =>
|
|
{
|
|
b.Navigation("PuzzleCards");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|