x-lab-lbq-technical-test/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Migrations/LeedsBeerQuestDbContextModelSnapshot.cs

157 lines
5.0 KiB
C#

// <auto-generated />
using System;
using LeedsBeerQuest.API.Data.Contexts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace LeedsBeerQuest.API.Data.Migrations
{
[DbContext(typeof(LeedsBeerQuestDbContext))]
partial class LeedsBeerQuestDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.10");
modelBuilder.Entity("LeedsBeerQuest.API.Data.Models.Category", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("LeedsBeerQuest.API.Data.Models.Tag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Tags");
});
modelBuilder.Entity("LeedsBeerQuest.API.Data.Models.Venue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Address")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("CategoryId")
.HasColumnType("INTEGER");
b.Property<DateTime>("DateAttended")
.HasColumnType("TEXT");
b.Property<string>("Excerpt")
.IsRequired()
.HasColumnType("TEXT");
b.Property<decimal>("Latitude")
.HasColumnType("TEXT");
b.Property<decimal>("Longitude")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Phone")
.HasColumnType("TEXT");
b.Property<decimal>("StarsAmenities")
.HasColumnType("TEXT");
b.Property<decimal>("StarsAtmosphere")
.HasColumnType("TEXT");
b.Property<decimal>("StarsBeer")
.HasColumnType("TEXT");
b.Property<decimal>("StarsValue")
.HasColumnType("TEXT");
b.Property<string>("Thumbnail")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Twitter")
.HasColumnType("TEXT");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CategoryId");
b.ToTable("Venues");
});
modelBuilder.Entity("TagVenue", b =>
{
b.Property<int>("TagsId")
.HasColumnType("INTEGER");
b.Property<int>("VenuesId")
.HasColumnType("INTEGER");
b.HasKey("TagsId", "VenuesId");
b.HasIndex("VenuesId");
b.ToTable("TagVenue");
});
modelBuilder.Entity("LeedsBeerQuest.API.Data.Models.Venue", b =>
{
b.HasOne("LeedsBeerQuest.API.Data.Models.Category", "Category")
.WithMany()
.HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Category");
});
modelBuilder.Entity("TagVenue", b =>
{
b.HasOne("LeedsBeerQuest.API.Data.Models.Tag", null)
.WithMany()
.HasForeignKey("TagsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("LeedsBeerQuest.API.Data.Models.Venue", null)
.WithMany()
.HasForeignKey("VenuesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}