86 lines
2.7 KiB
C#
86 lines
2.7 KiB
C#
// <auto-generated />
|
|
using CityInfo.API.DbContexts;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace CityInfo.API.Migrations
|
|
{
|
|
[DbContext(typeof(CityInfoContext))]
|
|
[Migration("20260310223915_CityInfoDBAddPOIDescription")]
|
|
partial class CityInfoDBAddPOIDescription
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "10.0.4");
|
|
|
|
modelBuilder.Entity("CityInfo.API.Entities.City", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Cities");
|
|
});
|
|
|
|
modelBuilder.Entity("CityInfo.API.Entities.PointOfInterest", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("CityId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CityId");
|
|
|
|
b.ToTable("PointsOfInterest");
|
|
});
|
|
|
|
modelBuilder.Entity("CityInfo.API.Entities.PointOfInterest", b =>
|
|
{
|
|
b.HasOne("CityInfo.API.Entities.City", "City")
|
|
.WithMany("PointsOfInterest")
|
|
.HasForeignKey("CityId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("City");
|
|
});
|
|
|
|
modelBuilder.Entity("CityInfo.API.Entities.City", b =>
|
|
{
|
|
b.Navigation("PointsOfInterest");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|