Descriptions for Records and DTOs

This commit is contained in:
2025-09-06 16:40:19 +02:00
parent 09e6b07186
commit d4ea40a875
9 changed files with 87 additions and 19 deletions

View File

@@ -10,9 +10,9 @@ namespace API.Schema.LibraryContext.LibraryConnectors;
public abstract class LibraryConnector : Identifiable
{
public LibraryType LibraryType { get; init; }
public string BaseUrl { get; init; }
public string Auth { get; init; }
protected ILog Log { get; init; }
[StringLength(256)] [Url] public string BaseUrl { get; init; }
[StringLength(256)] public string Auth { get; init; }
[NotMapped] protected ILog Log { get; init; }
protected LibraryConnector(LibraryType libraryType, string baseUrl, string auth)
: base()

View File

@@ -7,13 +7,9 @@ namespace API.Schema.MangaContext;
public class FileLibrary(string basePath, string libraryName)
: Identifiable(TokenGen.CreateToken(typeof(FileLibrary), basePath))
{
[StringLength(256)]
[Required]
public string BasePath { get; internal set; } = basePath;
[StringLength(256)] public string BasePath { get; internal set; } = basePath;
[StringLength(512)]
[Required]
public string LibraryName { get; internal set; } = libraryName;
[StringLength(512)] public string LibraryName { get; internal set; } = libraryName;
public override string ToString() => $"{base.ToString()} {LibraryName} - {BasePath}";
}