79 lines
2.5 KiB
C#
79 lines
2.5 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using Data;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Data.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(ApplicationDbContext))]
|
|||
|
[Migration("20241029070533_Init")]
|
|||
|
partial class Init
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "8.0.10")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|||
|
|
|||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("Models.Manufacturer", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(100)
|
|||
|
.HasColumnType("character varying(100)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Manufacturers");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("Models.Product", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<DateTime>("DeliveryDate")
|
|||
|
.HasColumnType("date");
|
|||
|
|
|||
|
b.Property<byte[]>("Image")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("bytea");
|
|||
|
|
|||
|
b.Property<string>("ManufacturerName")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(100)
|
|||
|
.HasColumnType("character varying(100)");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(100)
|
|||
|
.HasColumnType("character varying(100)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Products");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|