Ingest ExternalReviews from K+
Adds a new entity ExternalChapterMetadata, which would allow us to extend chapters to Recommendations, Ratings, etc in the future
This commit is contained in:
parent
749fb24185
commit
052b3f9fe4
29 changed files with 647 additions and 137 deletions
45
API/Entities/Metadata/ExternalChapterReview.cs
Normal file
45
API/Entities/Metadata/ExternalChapterReview.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System.Collections.Generic;
|
||||
using API.Entities.Enums;
|
||||
using API.Services.Plus;
|
||||
|
||||
namespace API.Entities.Metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an Externally supplied Review for a given Series
|
||||
/// </summary>
|
||||
public class ExternalChapterReview
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Tagline { get; set; }
|
||||
public required string Body { get; set; }
|
||||
/// <summary>
|
||||
/// Pure text version of the body
|
||||
/// </summary>
|
||||
public required string BodyJustText { get; set; }
|
||||
/// <summary>
|
||||
/// Raw from the provider. Usually Markdown
|
||||
/// </summary>
|
||||
public string RawBody { get; set; }
|
||||
public required ScrobbleProvider Provider { get; set; }
|
||||
public RatingAuthority Authority { get; set; } = RatingAuthority.User;
|
||||
public string SiteUrl { get; set; }
|
||||
/// <summary>
|
||||
/// Reviewer's username
|
||||
/// </summary>
|
||||
public string Username { get; set; }
|
||||
/// <summary>
|
||||
/// An Optional Rating coming from the Review
|
||||
/// </summary>
|
||||
public int Rating { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// The media's overall Score
|
||||
/// </summary>
|
||||
public int Score { get; set; }
|
||||
public int TotalVotes { get; set; }
|
||||
|
||||
public int ChapterId { get; set; }
|
||||
|
||||
// Relationships
|
||||
public ICollection<ExternalChapterMetadata> ExternalChapterMetadatas { get; set; } = null!;
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue