Implemented ability to leave a rating (up to 5 stars) and a text review (not UI supported until v0.2).

This commit is contained in:
Joseph Milazzo 2021-01-19 17:06:26 -06:00
parent 767f835e7b
commit ac993a59ba
13 changed files with 822 additions and 28 deletions

View file

@ -143,6 +143,31 @@ namespace API.Data.Migrations
b.ToTable("AppUserProgresses");
});
modelBuilder.Entity("API.Entities.AppUserRating", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("AppUserId")
.HasColumnType("INTEGER");
b.Property<int>("Rating")
.HasColumnType("INTEGER");
b.Property<string>("Review")
.HasColumnType("TEXT");
b.Property<int>("SeriesId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("AppUserId");
b.ToTable("AppUserRating");
});
modelBuilder.Entity("API.Entities.AppUserRole", b =>
{
b.Property<int>("UserId")
@ -415,6 +440,17 @@ namespace API.Data.Migrations
b.Navigation("AppUser");
});
modelBuilder.Entity("API.Entities.AppUserRating", b =>
{
b.HasOne("API.Entities.AppUser", "AppUser")
.WithMany("Ratings")
.HasForeignKey("AppUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AppUser");
});
modelBuilder.Entity("API.Entities.AppUserRole", b =>
{
b.HasOne("API.Entities.AppRole", "Role")
@ -538,6 +574,8 @@ namespace API.Data.Migrations
{
b.Navigation("Progresses");
b.Navigation("Ratings");
b.Navigation("UserRoles");
});