initial commit
This commit is contained in:
146
CityInfo.API/Migrations/CityInfoContextModelSnapshot.cs
Normal file
146
CityInfo.API/Migrations/CityInfoContextModelSnapshot.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
// <auto-generated />
|
||||
using CityInfo.API.DbContexts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CityInfo.API.Migrations
|
||||
{
|
||||
[DbContext(typeof(CityInfoContext))]
|
||||
partial class CityInfoContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(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");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Description = "The one with that big park.",
|
||||
Name = "New York City"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Description = "The one with the cathedral that was never really finished.",
|
||||
Name = "Antwerp"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
Description = "The one with that big tower.",
|
||||
Name = "Paris"
|
||||
});
|
||||
});
|
||||
|
||||
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");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CityId = 1,
|
||||
Description = "The most visited urban park in the United States.",
|
||||
Name = "Central Park"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
CityId = 1,
|
||||
Description = "A 102-story skyscraper located in Midtown Manhattan.",
|
||||
Name = "Empire State Building"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
CityId = 2,
|
||||
Description = "A Gothic style cathedral, conceived by architects Jan and Pieter Appelmans.",
|
||||
Name = "Cathedral"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 4,
|
||||
CityId = 2,
|
||||
Description = "The the finest example of railway architecture in Belgium.",
|
||||
Name = "Antwerp Central Station"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
CityId = 3,
|
||||
Description = "A wrought iron lattice tower on the Champ de Mars, named after engineer Gustave Eiffel.",
|
||||
Name = "Eiffel Tower"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
CityId = 3,
|
||||
Description = "The world's largest museum.",
|
||||
Name = "The Louvre"
|
||||
});
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user