Kavita/Kavita.Models/DTOs/Statistics/ReadingHistoryItemDto.cs
Fesaa c62b20f54b
BE Tech Debt (#4497)
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
2026-03-07 10:04:08 -08:00

51 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using Kavita.Models.Entities.Enums;
namespace Kavita.Models.DTOs.Statistics;
public sealed record ReadingHistoryItemDto
{
public List<int> SessionDataIds { get; set; }
public int SessionId { get; set; }
public DateTime StartTimeUtc { get; set; }
public DateTime EndTimeUtc { get; set; }
public DateTime LocalDate { get; set; } // For UI grouping by day
// Series info
public int SeriesId { get; set; }
public string SeriesName { get; set; } = string.Empty;
public MangaFormat SeriesFormat { get; set; }
// Chapter info
public List<ReadingHistoryChapterItemDto> Chapters { get; set; }
// Library info
public int LibraryId { get; set; }
public string LibraryName { get; set; } = string.Empty;
// Reading stats for this session
public int PagesRead { get; set; }
public int WordsRead { get; set; }
public int DurationSeconds { get; set; }
public int TotalPages { get; set; }
}
public sealed record ReadingHistoryChapterItemDto
{
public int ChapterId { get; set; }
public string Label { get; set; }
public DateTime StartTimeUtc { get; set; }
public DateTime EndTimeUtc { get; set; }
public int PagesRead { get; set; }
public int WordsRead { get; set; }
public int DurationSeconds { get; set; }
public int StartPage { get; set; }
public int EndPage { get; set; }
public int TotalPages { get; set; }
public bool Completed { get; set; }
}