generated from admin/template
77 lines
2.5 KiB
C#
77 lines
2.5 KiB
C#
// <auto-generated />
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using PokedexApi.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace PokedexApi.Migrations
|
|
{
|
|
[DbContext(typeof(PokemonContext))]
|
|
partial class PokemonContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.4")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("PokedexApi.Data.Models.Pokemon", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("pokemon_id");
|
|
|
|
b.Property<double>("Height")
|
|
.HasColumnType("double precision")
|
|
.HasColumnName("pokemon_height_m");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(30)
|
|
.HasColumnType("character varying(30)")
|
|
.HasColumnName("pokemon_name");
|
|
|
|
b.Property<double>("Weight")
|
|
.HasColumnType("double precision")
|
|
.HasColumnName("pokemon_weight_kg");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("pokemon");
|
|
});
|
|
|
|
modelBuilder.Entity("PokedexApi.Data.Models.Type", b =>
|
|
{
|
|
b.Property<int>("TypeId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type_id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("TypeId"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text")
|
|
.HasColumnName("type_name");
|
|
|
|
b.HasKey("TypeId");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("type");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|