//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using UWLib;
#nullable disable
namespace UWLib.Migrations
{
[DbContext(typeof(LectureContext))]
partial class LectureContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
modelBuilder.Entity("UWLib.Lecture", b =>
{
b.Property("Id")
.HasColumnType("INTEGER");
b.Property("Semester")
.HasColumnType("TEXT");
b.Property("Description")
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Url")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id", "Semester");
b.ToTable("Lectures");
});
modelBuilder.Entity("UWLib.LectureEvent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("From")
.HasColumnType("TEXT");
b.Property("LectureId")
.HasColumnType("INTEGER");
b.Property("LectureSemester")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Location")
.IsRequired()
.HasColumnType("TEXT");
b.Property("To")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("LectureId", "LectureSemester");
b.ToTable("LectureEvents");
});
modelBuilder.Entity("UWLib.LectureEvent", b =>
{
b.HasOne("UWLib.Lecture", "Lecture")
.WithMany("Events")
.HasForeignKey("LectureId", "LectureSemester")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Lecture");
});
modelBuilder.Entity("UWLib.Lecture", b =>
{
b.Navigation("Events");
});
#pragma warning restore 612, 618
}
}
}