MusicAlbumMetadata.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. namespace Jellyfin.Data.Entities
  7. {
  8. public partial class MusicAlbumMetadata : Metadata
  9. {
  10. partial void Init();
  11. /// <summary>
  12. /// Default constructor. Protected due to required properties, but present because EF needs it.
  13. /// </summary>
  14. protected MusicAlbumMetadata()
  15. {
  16. Labels = new HashSet<Company>();
  17. Init();
  18. }
  19. /// <summary>
  20. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
  21. /// </summary>
  22. public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe()
  23. {
  24. return new MusicAlbumMetadata();
  25. }
  26. /// <summary>
  27. /// Public constructor with required data.
  28. /// </summary>
  29. /// <param name="title">The title or name of the object.</param>
  30. /// <param name="language">ISO-639-3 3-character language codes.</param>
  31. /// <param name="dateadded">The date the object was added.</param>
  32. /// <param name="datemodified">The date the object was last modified.</param>
  33. /// <param name="_musicalbum0"></param>
  34. public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
  35. {
  36. if (string.IsNullOrEmpty(title))
  37. {
  38. throw new ArgumentNullException(nameof(title));
  39. }
  40. this.Title = title;
  41. if (string.IsNullOrEmpty(language))
  42. {
  43. throw new ArgumentNullException(nameof(language));
  44. }
  45. this.Language = language;
  46. if (_musicalbum0 == null)
  47. {
  48. throw new ArgumentNullException(nameof(_musicalbum0));
  49. }
  50. _musicalbum0.MusicAlbumMetadata.Add(this);
  51. this.Labels = new HashSet<Company>();
  52. Init();
  53. }
  54. /// <summary>
  55. /// Static create function (for use in LINQ queries, etc.)
  56. /// </summary>
  57. /// <param name="title">The title or name of the object.</param>
  58. /// <param name="language">ISO-639-3 3-character language codes.</param>
  59. /// <param name="dateadded">The date the object was added.</param>
  60. /// <param name="datemodified">The date the object was last modified.</param>
  61. /// <param name="_musicalbum0"></param>
  62. public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
  63. {
  64. return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
  65. }
  66. /*************************************************************************
  67. * Properties
  68. *************************************************************************/
  69. /// <summary>
  70. /// Backing field for Barcode.
  71. /// </summary>
  72. protected string _Barcode;
  73. /// <summary>
  74. /// When provided in a partial class, allows value of Barcode to be changed before setting.
  75. /// </summary>
  76. partial void SetBarcode(string oldValue, ref string newValue);
  77. /// <summary>
  78. /// When provided in a partial class, allows value of Barcode to be changed before returning.
  79. /// </summary>
  80. partial void GetBarcode(ref string result);
  81. /// <summary>
  82. /// Max length = 255
  83. /// </summary>
  84. [MaxLength(255)]
  85. [StringLength(255)]
  86. public string Barcode
  87. {
  88. get
  89. {
  90. string value = _Barcode;
  91. GetBarcode(ref value);
  92. return _Barcode = value;
  93. }
  94. set
  95. {
  96. string oldValue = _Barcode;
  97. SetBarcode(oldValue, ref value);
  98. if (oldValue != value)
  99. {
  100. _Barcode = value;
  101. }
  102. }
  103. }
  104. /// <summary>
  105. /// Backing field for LabelNumber.
  106. /// </summary>
  107. protected string _LabelNumber;
  108. /// <summary>
  109. /// When provided in a partial class, allows value of LabelNumber to be changed before setting.
  110. /// </summary>
  111. partial void SetLabelNumber(string oldValue, ref string newValue);
  112. /// <summary>
  113. /// When provided in a partial class, allows value of LabelNumber to be changed before returning.
  114. /// </summary>
  115. partial void GetLabelNumber(ref string result);
  116. /// <summary>
  117. /// Max length = 255
  118. /// </summary>
  119. [MaxLength(255)]
  120. [StringLength(255)]
  121. public string LabelNumber
  122. {
  123. get
  124. {
  125. string value = _LabelNumber;
  126. GetLabelNumber(ref value);
  127. return _LabelNumber = value;
  128. }
  129. set
  130. {
  131. string oldValue = _LabelNumber;
  132. SetLabelNumber(oldValue, ref value);
  133. if (oldValue != value)
  134. {
  135. _LabelNumber = value;
  136. }
  137. }
  138. }
  139. /// <summary>
  140. /// Backing field for Country.
  141. /// </summary>
  142. protected string _Country;
  143. /// <summary>
  144. /// When provided in a partial class, allows value of Country to be changed before setting.
  145. /// </summary>
  146. partial void SetCountry(string oldValue, ref string newValue);
  147. /// <summary>
  148. /// When provided in a partial class, allows value of Country to be changed before returning.
  149. /// </summary>
  150. partial void GetCountry(ref string result);
  151. /// <summary>
  152. /// Max length = 2
  153. /// </summary>
  154. [MaxLength(2)]
  155. [StringLength(2)]
  156. public string Country
  157. {
  158. get
  159. {
  160. string value = _Country;
  161. GetCountry(ref value);
  162. return _Country = value;
  163. }
  164. set
  165. {
  166. string oldValue = _Country;
  167. SetCountry(oldValue, ref value);
  168. if (oldValue != value)
  169. {
  170. _Country = value;
  171. }
  172. }
  173. }
  174. /*************************************************************************
  175. * Navigation properties
  176. *************************************************************************/
  177. [ForeignKey("Company_Labels_Id")]
  178. public virtual ICollection<Company> Labels { get; protected set; }
  179. }
  180. }