Add Entity & Migration for ChapterRatings

This commit is contained in:
Amelia 2025-04-25 18:06:09 +02:00
parent 5c06e14a73
commit a152f16cf6
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
7 changed files with 3721 additions and 0 deletions

View file

@ -0,0 +1,36 @@
using API.Services.Plus;
namespace API.Entities;
#nullable enable
public enum ChapterRatingProvider
{
Kavita = 0,
AniList = 1,
Mal = 2,
CbrUser = 3,
CbrCritic = 4,
}
public class AppUserChapterRating
{
public int Id { get; set; }
public float Rating { get; set; }
public bool HasBeenRated { get; set; }
public string? Review { get; set; }
public ChapterRatingProvider Provider {get; set; }
public int SeriesId { get; set; }
public Series Series { get; set; } = null!;
public int ChapterId { get; set; }
public Chapter Chapter { get; set; } = null!;
public int VolumeId { get; set; }
public Volume Volume { get; set; } = null!;
public int AppUserId { get; set; }
public AppUser AppUser { get; set; } = null!;
}