Fix Actions that can have related chapters and manga

This commit is contained in:
2025-10-16 20:28:43 +02:00
parent d029512354
commit ef907ee09d
15 changed files with 75 additions and 49 deletions

View File

@@ -1,15 +1,12 @@
using System.ComponentModel.DataAnnotations;
using API.Schema.MangaContext;
namespace API.Schema.ActionsContext.Actions.Generic;
public abstract class ActionWithChapterRecord(ActionsEnum action, DateTime performedAt, string chapterId) : ActionRecord(action, performedAt)
public interface IActionWithChapterRecord
{
protected ActionWithChapterRecord(ActionsEnum action, DateTime performedAt, Chapter chapter) : this(action, performedAt, chapter.Key) { }
/// <summary>
/// <see cref="Schema.MangaContext.Manga"/> for which the cover was downloaded
/// </summary>
[StringLength(64)]
public string ChapterId { get; init; } = chapterId;
public string ChapterId { get; init; }
}