BookMetadata.cs 1.1 KB

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