Files
odpo/works/lab-01/pokedex_api/PokedexApi/Migrations/20260911142245_PokemonTable.Designer.cs
2026-09-17 15:54:12 +03:00

80 lines
2.6 KiB
C#

// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PokedexApi.Data;
#nullable disable
namespace PokedexApi.Migrations
{
[DbContext(typeof(PokemonContext))]
[Migration("20260911142245_PokemonTable")]
partial class PokemonTable
{
/// <inheritdoc />
protected override void BuildTargetModel(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
}
}
}