Add Queries for MangaConnectorIds

This commit is contained in:
2025-07-22 15:56:57 +02:00
parent a0eb2be4bd
commit cb06cbbb61
5 changed files with 71 additions and 34 deletions

View File

@@ -39,6 +39,7 @@ public class Manga : Identifiable
[NotMapped] public Dictionary<string, string> IdsOnMangaConnectors =>
MangaConnectorIds.ToDictionary(id => id.MangaConnectorName, id => id.IdOnConnectorSite);
[NotMapped] public ICollection<string> MangaConnectorIdsIds => MangaConnectorIds.Select(id => id.Key).ToList();
[JsonIgnore] public ICollection<MangaConnectorId<Manga>> MangaConnectorIds = null!;
public Manga(string name, string description, string coverUrl, MangaReleaseStatus releaseStatus,

View File

@@ -11,7 +11,7 @@ public class MangaConnectorId<T> : Identifiable where T : Identifiable
[StringLength(64)] [Required] public string ObjId { get; private set; } = null!;
[JsonIgnore] public T Obj = null!;
[StringLength(32)] [Required] public string MangaConnectorName { get; private set; } = null!;
[StringLength(32)] [Required] public string MangaConnectorName { get; private set; }
[StringLength(256)] [Required] public string IdOnConnectorSite { get; init; }
[Url] [StringLength(512)] public string? WebsiteUrl { get; internal init; }