New Scanner + People Pages (#3286)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
1ed0eae22d
commit
ba20ad4ecc
142 changed files with 17529 additions and 3038 deletions
|
@ -153,7 +153,7 @@ public class Chapter : IEntityDate, IHasReadTimeEstimate, IHasCoverImage
|
|||
/// <summary>
|
||||
/// All people attached at a Chapter level. Usually Comics will have different people per issue.
|
||||
/// </summary>
|
||||
public ICollection<Person> People { get; set; } = new List<Person>();
|
||||
public ICollection<ChapterPeople> People { get; set; } = new List<ChapterPeople>();
|
||||
/// <summary>
|
||||
/// Genres for the Chapter
|
||||
/// </summary>
|
||||
|
|
|
@ -14,16 +14,6 @@ public class SeriesMetadata : IHasConcurrencyToken
|
|||
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
|
||||
[Obsolete("Use AppUserCollection instead")]
|
||||
public ICollection<CollectionTag> CollectionTags { get; set; } = new List<CollectionTag>();
|
||||
|
||||
public ICollection<Genre> Genres { get; set; } = new List<Genre>();
|
||||
public ICollection<Tag> Tags { get; set; } = new List<Tag>();
|
||||
/// <summary>
|
||||
/// All people attached at a Series level.
|
||||
/// </summary>
|
||||
public ICollection<Person> People { get; set; } = new List<Person>();
|
||||
|
||||
/// <summary>
|
||||
/// Highest Age Rating from all Chapters
|
||||
/// </summary>
|
||||
|
@ -51,7 +41,8 @@ public class SeriesMetadata : IHasConcurrencyToken
|
|||
/// <remarks>This is not populated from Chapters of the Series</remarks>
|
||||
public string WebLinks { get; set; } = string.Empty;
|
||||
|
||||
// Locks
|
||||
#region Locks
|
||||
|
||||
public bool LanguageLocked { get; set; }
|
||||
public bool SummaryLocked { get; set; }
|
||||
/// <summary>
|
||||
|
@ -79,9 +70,26 @@ public class SeriesMetadata : IHasConcurrencyToken
|
|||
public bool CoverArtistLocked { get; set; }
|
||||
public bool ReleaseYearLocked { get; set; }
|
||||
|
||||
// Relationship
|
||||
public Series Series { get; set; } = null!;
|
||||
#endregion
|
||||
|
||||
#region Relationships
|
||||
|
||||
[Obsolete("Use AppUserCollection instead")]
|
||||
public ICollection<CollectionTag> CollectionTags { get; set; } = new List<CollectionTag>();
|
||||
|
||||
public ICollection<Genre> Genres { get; set; } = new List<Genre>();
|
||||
public ICollection<Tag> Tags { get; set; } = new List<Tag>();
|
||||
|
||||
/// <summary>
|
||||
/// All people attached at a Series level.
|
||||
/// </summary>
|
||||
public ICollection<SeriesMetadataPeople> People { get; set; } = new List<SeriesMetadataPeople>();
|
||||
|
||||
public int SeriesId { get; set; }
|
||||
public Series Series { get; set; } = null!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
[ConcurrencyCheck]
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using API.Entities.Enums;
|
||||
using API.Entities.Metadata;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
public class Person
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string NormalizedName { get; set; }
|
||||
public required PersonRole Role { get; set; }
|
||||
|
||||
// Relationships
|
||||
public ICollection<SeriesMetadata> SeriesMetadatas { get; set; } = null!;
|
||||
public ICollection<Chapter> ChapterMetadatas { get; set; } = null!;
|
||||
}
|
14
API/Entities/Person/ChapterPeople.cs
Normal file
14
API/Entities/Person/ChapterPeople.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using API.Entities.Enums;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
public class ChapterPeople
|
||||
{
|
||||
public int ChapterId { get; set; }
|
||||
public virtual Chapter Chapter { get; set; }
|
||||
|
||||
public int PersonId { get; set; }
|
||||
public virtual Person Person { get; set; }
|
||||
|
||||
public required PersonRole Role { get; set; }
|
||||
}
|
60
API/Entities/Person/Person.cs
Normal file
60
API/Entities/Person/Person.cs
Normal file
|
@ -0,0 +1,60 @@
|
|||
using System.Collections.Generic;
|
||||
using API.Entities.Enums;
|
||||
using API.Entities.Interfaces;
|
||||
using API.Entities.Metadata;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
public class Person : IHasCoverImage
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string NormalizedName { get; set; }
|
||||
|
||||
//public ICollection<PersonAlias> Aliases { get; set; } = default!;
|
||||
|
||||
public string? CoverImage { get; set; }
|
||||
public bool CoverImageLocked { get; set; }
|
||||
public string PrimaryColor { get; set; }
|
||||
public string SecondaryColor { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// ASIN for person
|
||||
/// </summary>
|
||||
/// <remarks>Can be used for Amazon author lookup</remarks>
|
||||
public string? Asin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// https://anilist.co/staff/{AniListId}/
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public int AniListId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://myanimelist.net/people/{MalId}/
|
||||
/// https://myanimelist.net/character/{MalId}/CharacterName
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public long MalId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://hardcover.app/authors/{HardcoverId}
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public string? HardcoverId { get; set; }
|
||||
/// <summary>
|
||||
/// https://metron.cloud/creator/{slug}/
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
//public long MetronId { get; set; } = 0;
|
||||
|
||||
// Relationships
|
||||
public ICollection<ChapterPeople> ChapterPeople { get; set; } = new List<ChapterPeople>();
|
||||
public ICollection<SeriesMetadataPeople> SeriesMetadataPeople { get; set; } = new List<SeriesMetadataPeople>();
|
||||
|
||||
|
||||
public void ResetColorScape()
|
||||
{
|
||||
PrimaryColor = string.Empty;
|
||||
SecondaryColor = string.Empty;
|
||||
}
|
||||
}
|
15
API/Entities/Person/SeriesMetadataPeople.cs
Normal file
15
API/Entities/Person/SeriesMetadataPeople.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using API.Entities.Enums;
|
||||
using API.Entities.Metadata;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
public class SeriesMetadataPeople
|
||||
{
|
||||
public int SeriesMetadataId { get; set; }
|
||||
public virtual SeriesMetadata SeriesMetadata { get; set; }
|
||||
|
||||
public int PersonId { get; set; }
|
||||
public virtual Person Person { get; set; }
|
||||
|
||||
public required PersonRole Role { get; set; }
|
||||
}
|
|
@ -10,4 +10,5 @@ public enum SideNavStreamType
|
|||
ExternalSource = 6,
|
||||
AllSeries = 7,
|
||||
WantToRead = 8,
|
||||
BrowseAuthors = 9
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue