using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Jellyfin.Plugin.RedditComments.Models;
///
/// A single Reddit comment with nested replies.
///
public class CommentDto
{
/// Gets or sets the comment author.
public string Author { get; set; } = string.Empty;
/// Gets or sets the comment body (plain text / markdown source).
public string Body { get; set; } = string.Empty;
/// Gets or sets the comment score.
public int Score { get; set; }
/// Gets or sets the creation time (unix seconds, UTC).
public long CreatedUtc { get; set; }
/// Gets or sets the nested replies.
public List Replies { get; set; } = new List();
}
///
/// Response returned by the plugin API for a Jellyfin item.
///
public class CommentsResponse
{
/// Gets or sets a value indicating whether a Reddit thread was found.
public bool Found { get; set; }
/// Gets or sets the Jellyfin item id.
public string ItemId { get; set; } = string.Empty;
/// Gets or sets a human-readable label for the media (e.g. "Show — Episode 5").
public string MediaLabel { get; set; } = string.Empty;
/// Gets or sets the Reddit thread id.
public string ThreadId { get; set; } = string.Empty;
/// Gets or sets the Reddit thread title.
public string ThreadTitle { get; set; } = string.Empty;
/// Gets or sets the subreddit.
public string Subreddit { get; set; } = string.Empty;
/// Gets or sets the thread permalink path.
public string Permalink { get; set; } = string.Empty;
/// Gets or sets the thread score.
public int ThreadScore { get; set; }
/// Gets or sets the thread's total comment count.
public int NumComments { get; set; }
/// Gets or sets when the data was fetched from Reddit (ISO 8601, UTC).
public string FetchedAt { get; set; } = string.Empty;
/// Gets or sets a value indicating whether the response came from the local cache.
public bool Cached { get; set; }
/// Gets or sets an informational message (e.g. why nothing was found).
public string Message { get; set; } = string.Empty;
/// Gets or sets the top-level comments.
public List Comments { get; set; } = new List();
}
///
/// A Reddit thread candidate found via search.
///
public class ThreadCandidate
{
/// Gets or sets the thread id.
public string Id { get; set; } = string.Empty;
/// Gets or sets the thread title.
public string Title { get; set; } = string.Empty;
/// Gets or sets the subreddit.
public string Subreddit { get; set; } = string.Empty;
/// Gets or sets the permalink path.
public string Permalink { get; set; } = string.Empty;
/// Gets or sets the thread score.
public int Score { get; set; }
/// Gets or sets the thread's comment count.
public int NumComments { get; set; }
/// Gets or sets the link flair text, if any.
public string LinkFlairText { get; set; } = string.Empty;
}