SeriesMetadata.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma warning disable CA2227
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using Jellyfin.Data.Interfaces;
  6. namespace Jellyfin.Data.Entities.Libraries
  7. {
  8. /// <summary>
  9. /// An entity representing series metadata.
  10. /// </summary>
  11. public class SeriesMetadata : ItemMetadata, IHasCompanies
  12. {
  13. /// <summary>
  14. /// Initializes a new instance of the <see cref="SeriesMetadata"/> class.
  15. /// </summary>
  16. /// <param name="title">The title or name of the object.</param>
  17. /// <param name="language">ISO-639-3 3-character language codes.</param>
  18. public SeriesMetadata(string title, string language) : base(title, language)
  19. {
  20. Networks = new HashSet<Company>();
  21. }
  22. /// <summary>
  23. /// Gets or sets the outline.
  24. /// </summary>
  25. /// <remarks>
  26. /// Max length = 1024.
  27. /// </remarks>
  28. [MaxLength(1024)]
  29. [StringLength(1024)]
  30. public string? Outline { get; set; }
  31. /// <summary>
  32. /// Gets or sets the plot.
  33. /// </summary>
  34. /// <remarks>
  35. /// Max length = 65535.
  36. /// </remarks>
  37. [MaxLength(65535)]
  38. [StringLength(65535)]
  39. public string? Plot { get; set; }
  40. /// <summary>
  41. /// Gets or sets the tagline.
  42. /// </summary>
  43. /// <remarks>
  44. /// Max length = 1024.
  45. /// </remarks>
  46. [MaxLength(1024)]
  47. [StringLength(1024)]
  48. public string? Tagline { get; set; }
  49. /// <summary>
  50. /// Gets or sets the country code.
  51. /// </summary>
  52. /// <remarks>
  53. /// Max length = 2.
  54. /// </remarks>
  55. [MaxLength(2)]
  56. [StringLength(2)]
  57. public string? Country { get; set; }
  58. /// <summary>
  59. /// Gets or sets a collection containing the networks.
  60. /// </summary>
  61. public virtual ICollection<Company> Networks { get; protected set; }
  62. /// <inheritdoc />
  63. public ICollection<Company> Companies => Networks;
  64. }
  65. }