CompanyMetadata.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace Jellyfin.Data.Entities.Libraries
  4. {
  5. /// <summary>
  6. /// An entity holding metadata for a <see cref="Company"/>.
  7. /// </summary>
  8. public class CompanyMetadata : ItemMetadata
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="CompanyMetadata"/> 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="company">The company.</param>
  16. public CompanyMetadata(string title, string language, Company company) : base(title, language)
  17. {
  18. if (company == null)
  19. {
  20. throw new ArgumentNullException(nameof(company));
  21. }
  22. company.CompanyMetadata.Add(this);
  23. }
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="CompanyMetadata"/> class.
  26. /// </summary>
  27. protected CompanyMetadata()
  28. {
  29. }
  30. /// <summary>
  31. /// Gets or sets the description.
  32. /// </summary>
  33. /// <remarks>
  34. /// Max length = 65535.
  35. /// </remarks>
  36. [MaxLength(65535)]
  37. [StringLength(65535)]
  38. public string Description { get; set; }
  39. /// <summary>
  40. /// Gets or sets the headquarters.
  41. /// </summary>
  42. /// <remarks>
  43. /// Max length = 255.
  44. /// </remarks>
  45. [MaxLength(255)]
  46. [StringLength(255)]
  47. public string Headquarters { 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 homepage.
  59. /// </summary>
  60. /// <remarks>
  61. /// Max length = 1024.
  62. /// </remarks>
  63. [MaxLength(1024)]
  64. [StringLength(1024)]
  65. public string Homepage { get; set; }
  66. }
  67. }