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

@ -14,6 +14,7 @@ namespace API.Entities
public ICollection<Library> Libraries { get; set; }
public ICollection<AppUserRole> UserRoles { get; set; }
public ICollection<AppUserProgress> Progresses { get; set; }
public ICollection<AppUserRating> Ratings { get; set; }
[ConcurrencyCheck]
public uint RowVersion { get; set; }

View file

@ -0,0 +1,22 @@

namespace API.Entities
{
public class AppUserRating
{
public int Id { get; set; }
/// <summary>
/// A number between 0-5 that represents how good a series is.
/// </summary>
public int Rating { get; set; }
/// <summary>
/// A short summary the user can write when giving their review.
/// </summary>
public string Review { get; set; }
public int SeriesId { get; set; }
// Relationships
public int AppUserId { get; set; }
public AppUser AppUser { get; set; }
}
}