MovieMetadata.cs 2.0 KB

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