EpisodeMetadata.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace Jellyfin.Data.Entities.Libraries
  4. {
  5. /// <summary>
  6. /// An entity containing metadata for an <see cref="Episode"/>.
  7. /// </summary>
  8. public class EpisodeMetadata : ItemMetadata
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="EpisodeMetadata"/> 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. /// <param name="episode">The episode.</param>
  16. public EpisodeMetadata(string title, string language, Episode episode) : base(title, language)
  17. {
  18. if (episode == null)
  19. {
  20. throw new ArgumentNullException(nameof(episode));
  21. }
  22. episode.EpisodeMetadata.Add(this);
  23. }
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.
  26. /// </summary>
  27. /// <remarks>
  28. /// Default constructor. Protected due to required properties, but present because EF needs it.
  29. /// </remarks>
  30. protected EpisodeMetadata()
  31. {
  32. }
  33. /// <summary>
  34. /// Gets or sets the outline.
  35. /// </summary>
  36. /// <remarks>
  37. /// Max length = 1024.
  38. /// </remarks>
  39. [MaxLength(1024)]
  40. [StringLength(1024)]
  41. public string Outline { get; set; }
  42. /// <summary>
  43. /// Gets or sets the plot.
  44. /// </summary>
  45. /// <remarks>
  46. /// Max length = 65535.
  47. /// </remarks>
  48. [MaxLength(65535)]
  49. [StringLength(65535)]
  50. public string Plot { get; set; }
  51. /// <summary>
  52. /// Gets or sets the tagline.
  53. /// </summary>
  54. /// <remarks>
  55. /// Max length = 1024.
  56. /// </remarks>
  57. [MaxLength(1024)]
  58. [StringLength(1024)]
  59. public string Tagline { get; set; }
  60. }
  61. }