Kavita/API/Entities/Metadata/SeriesMetadata.cs
Joseph Milazzo af24c928d7
Feature/local metadata more tags (#832)
* Stashing code

* removed some debug code on series detail page. Now detail is collapsed by default.

* Added AgeRating

* Fixed a crash when NetVips tries to write a cover file and cover directory is not existing.

* When a card is selected for bulk actions, show an outline in addition to select box

* Added AgeRating into the metadata parsing. Added a hack where ComicInfo uses Number in ComicInfo rather than Volume. This is to test out the effects on users libraries.

* Added AgeRating and ReleaseDate to the metadata implelentation.
2021-12-06 11:59:47 -08:00

49 lines
1.3 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using API.Entities.Enums;
using API.Entities.Interfaces;
using Microsoft.EntityFrameworkCore;
namespace API.Entities.Metadata
{
[Index(nameof(Id), nameof(SeriesId), IsUnique = true)]
public class SeriesMetadata : IHasConcurrencyToken
{
public int Id { get; set; }
public string Summary { get; set; }
public ICollection<CollectionTag> CollectionTags { get; set; }
public ICollection<Genre> Genres { get; set; } = new List<Genre>();
/// <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>
public AgeRating AgeRating { get; set; }
/// <summary>
/// Earliest Year from all chapters
/// </summary>
public int ReleaseYear { get; set; }
// Relationship
public Series Series { get; set; }
public int SeriesId { get; set; }
/// <inheritdoc />
[ConcurrencyCheck]
public uint RowVersion { get; private set; }
/// <inheritdoc />
public void OnSavingChanges()
{
RowVersion++;
}
}
}