EpisodeMetadata.cs 6.2 KB

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