Files
bright-glimmer/BrightGlimmer.Data/Migrations/20190424233105_CreateDatabase.Designer.cs

194 lines
5.5 KiB
C#

// <auto-generated />
using System;
using BrightGlimmer.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace BrightGlimmer.Data.Migrations
{
[DbContext(typeof(BgContext))]
[Migration("20190424233105_CreateDatabase")]
partial class CreateDatabase
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
modelBuilder.Entity("BrightGlimmer.Domain.Address", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("City");
b.Property<string>("County");
b.Property<DateTime>("CreatedDate");
b.Property<bool>("IsDeleted");
b.Property<decimal>("Latitude");
b.Property<decimal>("Longitude");
b.Property<DateTime>("ModifiedDate");
b.Property<string>("StateCode");
b.Property<string>("StreetAddress1");
b.Property<string>("StreetAddress2");
b.Property<string>("ZipCode");
b.HasKey("Id");
b.ToTable("Addresses");
});
modelBuilder.Entity("BrightGlimmer.Domain.AssignedCourse", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid?>("CourseId");
b.Property<DateTime>("CreatedDate");
b.Property<decimal>("Grade");
b.Property<bool>("IsActive");
b.Property<bool>("IsDeleted");
b.Property<DateTime>("ModifiedDate");
b.Property<Guid?>("StudentId");
b.Property<string>("Term");
b.HasKey("Id");
b.HasIndex("CourseId");
b.HasIndex("StudentId");
b.ToTable("AssignedCourses");
});
modelBuilder.Entity("BrightGlimmer.Domain.Course", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Code");
b.Property<DateTime>("CreatedDate");
b.Property<string>("Description");
b.Property<bool>("IsDeleted");
b.Property<DateTime>("ModifiedDate");
b.Property<string>("Name");
b.HasKey("Id");
b.ToTable("Courses");
});
modelBuilder.Entity("BrightGlimmer.Domain.Phone", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AreaCode");
b.Property<DateTime>("CreatedDate");
b.Property<bool>("IsDeleted");
b.Property<DateTime>("ModifiedDate");
b.Property<int>("Number");
b.Property<Guid?>("StudentId");
b.Property<int>("Type");
b.HasKey("Id");
b.HasIndex("StudentId");
b.ToTable("Phones");
});
modelBuilder.Entity("BrightGlimmer.Domain.Student", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid?>("AddressId");
b.Property<DateTime>("CreatedDate");
b.Property<string>("Email");
b.Property<string>("FirstName");
b.Property<bool>("IsDeleted");
b.Property<string>("LastName");
b.Property<string>("MiddleName");
b.Property<DateTime>("ModifiedDate");
b.Property<string>("ProfilePictureUrl");
b.Property<int>("StudentNumber");
b.HasKey("Id");
b.HasIndex("AddressId");
b.HasIndex("StudentNumber")
.IsUnique();
b.ToTable("Students");
});
modelBuilder.Entity("BrightGlimmer.Domain.AssignedCourse", b =>
{
b.HasOne("BrightGlimmer.Domain.Course", "Course")
.WithMany()
.HasForeignKey("CourseId");
b.HasOne("BrightGlimmer.Domain.Student", "Student")
.WithMany("AssignedCourses")
.HasForeignKey("StudentId");
});
modelBuilder.Entity("BrightGlimmer.Domain.Phone", b =>
{
b.HasOne("BrightGlimmer.Domain.Student")
.WithMany("Phones")
.HasForeignKey("StudentId");
});
modelBuilder.Entity("BrightGlimmer.Domain.Student", b =>
{
b.HasOne("BrightGlimmer.Domain.Address", "Address")
.WithMany()
.HasForeignKey("AddressId");
});
#pragma warning restore 612, 618
}
}
}