118 lines
3.8 KiB
C#
118 lines
3.8 KiB
C#
|
// <auto-generated />
|
|||
|
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("20241204111540_InitialCreate")]
|
|||
|
partial class InitialCreate
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
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<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Categories");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("LootBoxSimulator.Models.DAO.ItemDao", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int?>("CategoryId")
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.Property<int?>("RateId")
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
b.Property<string>("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<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Color")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.Property<decimal>("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
|
|||
|
}
|
|||
|
}
|
|||
|
}
|