Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

1.8 KB
Raw Blame
using System;
using API.DTOs.Scrobbling;
using API.Entities.Interfaces;
using API.Services;

namespace API.Entities.Scrobble;
#nullable enable

/// <summary>
/// Represents an event that would need to be sent to the API layer. These rows will be processed and deleted.
/// </summary>
public class ScrobbleEvent : IEntityDate
{
    public long Id { get; set; }

    public required ScrobbleEventType ScrobbleEventType { get; set; }

    public int? AniListId { get; set; }
    public long? MalId { get; set; }


    /// <summary>
    /// Rating for the Series
    /// </summary>
    public float? Rating { get; set; }
    /// <summary>
    /// Review for the Series
    /// </summary>
    public string? ReviewBody { get; set; }
    public string? ReviewTitle { get; set; }
    public required MediaFormat Format { get; set; }
    /// <summary>
    /// Depends on the ScrobbleEvent if filled in
    /// </summary>
    public int? ChapterNumber { get; set; }
    /// <summary>
    /// Depends on the ScrobbleEvent if filled in
    /// </summary>
    public int? VolumeNumber { get; set; }
    /// <summary>
    /// Has this event been processed and pushed to Provider
    /// </summary>
    public bool IsProcessed { get; set; }
    /// <summary>
    /// The date this was processed
    /// </summary>
    public DateTime? ProcessDateUtc { get; set; }


    public required int SeriesId { get; set; }
    public Series Series { get; set; }

    public required int LibraryId { get; set; }
    public Library Library { get; set; }

    public AppUser AppUser { get; set; }
    public required int AppUserId { get; set; }

    public DateTime Created { get; set; }
    public DateTime LastModified { get; set; }
    public DateTime CreatedUtc { get; set; }
    public DateTime LastModifiedUtc { get; set; }
}