Collection Rework (#2830)
This commit is contained in:
parent
0dacc061f1
commit
deaaccb96a
93 changed files with 5413 additions and 1120 deletions
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using API.Entities.Enums;
|
||||
using API.Entities.Interfaces;
|
||||
using API.Entities.Metadata;
|
||||
using API.Extensions;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
|
|
@ -105,6 +106,7 @@ public class Series : IEntityDate, IHasReadTimeEstimate
|
|||
|
||||
public ICollection<AppUserRating> Ratings { get; set; } = null!;
|
||||
public ICollection<AppUserProgress> Progress { get; set; } = null!;
|
||||
public ICollection<AppUserCollection> Collections { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Relations to other Series, like Sequels, Prequels, etc
|
||||
|
|
@ -114,6 +116,8 @@ public class Series : IEntityDate, IHasReadTimeEstimate
|
|||
public ICollection<SeriesRelation> RelationOf { get; set; } = null!;
|
||||
|
||||
|
||||
|
||||
|
||||
// Relationships
|
||||
public List<Volume> Volumes { get; set; } = null!;
|
||||
public Library Library { get; set; } = null!;
|
||||
|
|
@ -131,4 +135,12 @@ public class Series : IEntityDate, IHasReadTimeEstimate
|
|||
LastChapterAdded = DateTime.Now;
|
||||
LastChapterAddedUtc = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public bool MatchesSeriesByName(string nameNormalized, string localizedNameNormalized)
|
||||
{
|
||||
return NormalizedName == nameNormalized ||
|
||||
NormalizedLocalizedName == nameNormalized ||
|
||||
NormalizedName == localizedNameNormalized ||
|
||||
NormalizedLocalizedName == localizedNameNormalized;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue