mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 20:08:19 +02:00
Add FileLibrary DTO and CreateLibraryRecord
This commit is contained in:
@@ -6,7 +6,7 @@ namespace API.Controllers.DTOs;
|
||||
/// <summary>
|
||||
/// The <see cref="API.Schema.MangaContext.Author"/> DTO
|
||||
/// </summary>
|
||||
public record Author(string Key, string Name) : Identifiable(Key)
|
||||
public sealed record Author(string Key, string Name) : Identifiable(Key)
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the Author.
|
||||
|
@@ -6,7 +6,7 @@ namespace API.Controllers.DTOs;
|
||||
/// <summary>
|
||||
/// <see cref="API.Schema.MangaContext.Chapter"/> DTO
|
||||
/// </summary>
|
||||
public record Chapter(string Key, string MangaId, int? Volume, string ChapterNumber, string? Title, IEnumerable<MangaConnectorId> MangaConnectorIds, bool Downloaded) : Identifiable(Key)
|
||||
public sealed record Chapter(string Key, string MangaId, int? Volume, string ChapterNumber, string? Title, IEnumerable<MangaConnectorId> MangaConnectorIds, bool Downloaded) : Identifiable(Key)
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifier of the Manga this Chapter belongs to
|
||||
|
14
API/Controllers/DTOs/FileLibrary.cs
Normal file
14
API/Controllers/DTOs/FileLibrary.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Controllers.DTOs;
|
||||
|
||||
public sealed record FileLibrary(string Key, string BasePath, string LibraryName) : Identifiable(Key)
|
||||
{
|
||||
[StringLength(256)]
|
||||
[Required]
|
||||
public string BasePath { get; internal set; } = BasePath;
|
||||
|
||||
[StringLength(512)]
|
||||
[Required]
|
||||
public string LibraryName { get; internal set; } = LibraryName;
|
||||
}
|
@@ -7,7 +7,7 @@ namespace API.Controllers.DTOs;
|
||||
/// <summary>
|
||||
/// <see cref="Schema.MangaContext.Manga"/> DTO
|
||||
/// </summary>
|
||||
public record Manga(string Key, string Name, string Description, MangaReleaseStatus ReleaseStatus, IEnumerable<MangaConnectorId> MangaConnectorIds, float IgnoreChaptersBefore, uint? Year, string? OriginalLanguage, IEnumerable<string> ChapterIds, IEnumerable<Author> Authors, IEnumerable<string> Tags, IEnumerable<Link> Links, IEnumerable<AltTitle> AltTitles, string? FileLibraryId)
|
||||
public sealed record Manga(string Key, string Name, string Description, MangaReleaseStatus ReleaseStatus, IEnumerable<MangaConnectorId> MangaConnectorIds, float IgnoreChaptersBefore, uint? Year, string? OriginalLanguage, IEnumerable<string> ChapterIds, IEnumerable<Author> Authors, IEnumerable<string> Tags, IEnumerable<Link> Links, IEnumerable<AltTitle> AltTitles, string? FileLibraryId)
|
||||
: MinimalManga(Key, Name, Description, ReleaseStatus, MangaConnectorIds)
|
||||
{
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user