MusicAlbumMetadata.cs 1.7 KB

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