BookMetadata.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using Jellyfin.Data.Interfaces;
  3. namespace Jellyfin.Data.Entities.Libraries
  4. {
  5. /// <summary>
  6. /// An entity containing metadata for a book.
  7. /// </summary>
  8. public class BookMetadata : ItemMetadata, IHasCompanies
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="BookMetadata"/> class.
  12. /// </summary>
  13. /// <param name="title">The title or name of the object.</param>
  14. /// <param name="language">ISO-639-3 3-character language codes.</param>
  15. public BookMetadata(string title, string language) : base(title, language)
  16. {
  17. Publishers = new HashSet<Company>();
  18. }
  19. /// <summary>
  20. /// Gets or sets the ISBN.
  21. /// </summary>
  22. public long? Isbn { get; set; }
  23. /// <summary>
  24. /// Gets a collection of the publishers for this book.
  25. /// </summary>
  26. public virtual ICollection<Company> Publishers { get; private set; }
  27. /// <inheritdoc />
  28. public ICollection<Company> Companies => Publishers;
  29. }
  30. }