MusicAlbumMetadata.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.Collections.Generic;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace Jellyfin.Data.Entities.Libraries
  4. {
  5. /// <summary>
  6. /// An entity holding the metadata for a music album.
  7. /// </summary>
  8. public class MusicAlbumMetadata : ItemMetadata
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.
  12. /// </summary>
  13. /// <param name="title">The title or name of the album.</param>
  14. /// <param name="language">ISO-639-3 3-character language codes.</param>
  15. public MusicAlbumMetadata(string title, string language) : base(title, language)
  16. {
  17. Labels = new HashSet<Company>();
  18. }
  19. /// <summary>
  20. /// Gets or sets the barcode.
  21. /// </summary>
  22. /// <remarks>
  23. /// Max length = 255.
  24. /// </remarks>
  25. [MaxLength(255)]
  26. [StringLength(255)]
  27. public string? Barcode { get; set; }
  28. /// <summary>
  29. /// Gets or sets the label number.
  30. /// </summary>
  31. /// <remarks>
  32. /// Max length = 255.
  33. /// </remarks>
  34. [MaxLength(255)]
  35. [StringLength(255)]
  36. public string? LabelNumber { get; set; }
  37. /// <summary>
  38. /// Gets or sets the country code.
  39. /// </summary>
  40. /// <remarks>
  41. /// Max length = 2.
  42. /// </remarks>
  43. [MaxLength(2)]
  44. [StringLength(2)]
  45. public string? Country { get; set; }
  46. /// <summary>
  47. /// Gets a collection containing the labels.
  48. /// </summary>
  49. public virtual ICollection<Company> Labels { get; private set; }
  50. }
  51. }