SeasonMetadata.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace Jellyfin.Data.Entities.Libraries
  4. {
  5. /// <summary>
  6. /// An entity that holds metadata for seasons.
  7. /// </summary>
  8. public class SeasonMetadata : ItemMetadata
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="SeasonMetadata"/> 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="season">The season.</param>
  16. public SeasonMetadata(string title, string language, Season season) : base(title, language)
  17. {
  18. if (season == null)
  19. {
  20. throw new ArgumentNullException(nameof(season));
  21. }
  22. season.SeasonMetadata.Add(this);
  23. }
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="SeasonMetadata"/> class.
  26. /// </summary>
  27. /// <remarks>
  28. /// Default constructor. Protected due to required properties, but present because EF needs it.
  29. /// </remarks>
  30. protected SeasonMetadata()
  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. }
  43. }