Fix redundant keys, MangaSearch

This commit is contained in:
2024-12-16 19:25:22 +01:00
parent 87274aca19
commit 3b58e0498b
16 changed files with 126 additions and 98 deletions

View File

@@ -10,6 +10,10 @@ public class Author(string authorName)
public string AuthorId { get; init; } = TokenGen.CreateToken(typeof(Author), 64);
public string AuthorName { get; init; } = authorName;
[ForeignKey("MangaIds")]
public virtual Manga[] Mangas { get; internal set; } = [];
public override bool Equals(object? obj)
{
if (obj is not Author other)
return false;
return other.AuthorName == AuthorName;
}
}