Daily per-user aggregates, counted on the server clock between progress reports. Includes the cleanup task for rows past 90 days.
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
|
|
namespace Jellyfin.Plugin.Herald.Stats;
|
|
|
|
/// <summary>
|
|
/// Watch activity of one user over a range of days.
|
|
/// </summary>
|
|
public class UserWatchSummary
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the user id.
|
|
/// </summary>
|
|
public Guid UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the user name. <c>null</c> if the user no longer exists.
|
|
/// </summary>
|
|
public string? UserName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the watched seconds in the range.
|
|
/// </summary>
|
|
public long WatchedSeconds { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the watched hours in the range, rounded to two decimals.
|
|
/// </summary>
|
|
public double WatchedHours { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the number of started plays in the range.
|
|
/// </summary>
|
|
public int PlayCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the last playback activity in the range (UTC), if any.
|
|
/// </summary>
|
|
public DateTime? LastActivity { get; set; }
|
|
}
|