mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-17 10:50:45 +02:00
Fix Actions that can have related chapters and manga
This commit is contained in:
@@ -11,8 +11,8 @@ public sealed record ActionRecord : Identifiable
|
||||
{
|
||||
Action = actionRecord.Action;
|
||||
PerformedAt = actionRecord.PerformedAt;
|
||||
MangaId = actionRecord is ActionWithMangaRecord m ? m.MangaId : null;
|
||||
ChapterId = actionRecord is ActionWithChapterRecord c ? c.ChapterId : null;
|
||||
MangaId = actionRecord is IActionWithMangaRecord m ? m.MangaId : null;
|
||||
ChapterId = actionRecord is IActionWithChapterRecord c ? c.ChapterId : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -28,13 +28,13 @@ public sealed record ActionRecord : Identifiable
|
||||
public DateTime PerformedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// MangaId if Record is <see cref="ActionWithMangaRecord"/>
|
||||
/// MangaId if Record is <see cref="IActionWithMangaRecord"/>
|
||||
/// </summary>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? MangaId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// ChapterId if Record is <see cref="ActionWithMangaRecord"/>
|
||||
/// ChapterId if Record is <see cref="IActionWithMangaRecord"/>
|
||||
/// </summary>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? ChapterId { get; init; }
|
||||
|
Reference in New Issue
Block a user