//
using System;
using LootBoxSimulator.Models.DAO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace LootBoxSimulator.Migrations
{
[DbContext(typeof(RemoteDatabaseContext))]
[Migration("20241204111858_AddDescripForItem")]
partial class AddDescripForItem
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("LootBoxSimulator.Models.DAO.CategoryDao", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("LootBoxSimulator.Models.DAO.ItemDao", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CategoryId")
.HasColumnType("integer");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("RateId")
.HasColumnType("integer");
b.Property("Url")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CategoryId");
b.HasIndex("RateId");
b.ToTable("Items");
});
modelBuilder.Entity("LootBoxSimulator.Models.DAO.RateDao", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Color")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("Rate")
.HasColumnType("numeric");
b.HasKey("Id");
b.ToTable("Rates");
});
modelBuilder.Entity("LootBoxSimulator.Models.DAO.ItemDao", b =>
{
b.HasOne("LootBoxSimulator.Models.DAO.CategoryDao", "Category")
.WithMany()
.HasForeignKey("CategoryId");
b.HasOne("LootBoxSimulator.Models.DAO.RateDao", "Rate")
.WithMany()
.HasForeignKey("RateId");
b.Navigation("Category");
b.Navigation("Rate");
});
#pragma warning restore 612, 618
}
}
}