Series.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace Jellyfin.Data.Entities
  6. {
  7. public partial class Series : LibraryItem
  8. {
  9. partial void Init();
  10. /// <summary>
  11. /// Default constructor. Protected due to required properties, but present because EF needs it.
  12. /// </summary>
  13. protected Series()
  14. {
  15. SeriesMetadata = new HashSet<SeriesMetadata>();
  16. Seasons = new HashSet<Season>();
  17. Init();
  18. }
  19. /// <summary>
  20. /// Public constructor with required data.
  21. /// </summary>
  22. /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
  23. /// <param name="dateadded">The date the object was added.</param>
  24. public Series(Guid urlid, DateTime dateadded)
  25. {
  26. this.UrlId = urlid;
  27. this.SeriesMetadata = new HashSet<SeriesMetadata>();
  28. this.Seasons = new HashSet<Season>();
  29. Init();
  30. }
  31. /// <summary>
  32. /// Static create function (for use in LINQ queries, etc.)
  33. /// </summary>
  34. /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
  35. /// <param name="dateadded">The date the object was added.</param>
  36. public static Series Create(Guid urlid, DateTime dateadded)
  37. {
  38. return new Series(urlid, dateadded);
  39. }
  40. /*************************************************************************
  41. * Properties
  42. *************************************************************************/
  43. /// <summary>
  44. /// Backing field for AirsDayOfWeek.
  45. /// </summary>
  46. protected DayOfWeek? _AirsDayOfWeek;
  47. /// <summary>
  48. /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before setting.
  49. /// </summary>
  50. partial void SetAirsDayOfWeek(DayOfWeek? oldValue, ref DayOfWeek? newValue);
  51. /// <summary>
  52. /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before returning.
  53. /// </summary>
  54. partial void GetAirsDayOfWeek(ref DayOfWeek? result);
  55. public DayOfWeek? AirsDayOfWeek
  56. {
  57. get
  58. {
  59. DayOfWeek? value = _AirsDayOfWeek;
  60. GetAirsDayOfWeek(ref value);
  61. return _AirsDayOfWeek = value;
  62. }
  63. set
  64. {
  65. DayOfWeek? oldValue = _AirsDayOfWeek;
  66. SetAirsDayOfWeek(oldValue, ref value);
  67. if (oldValue != value)
  68. {
  69. _AirsDayOfWeek = value;
  70. }
  71. }
  72. }
  73. /// <summary>
  74. /// Backing field for AirsTime.
  75. /// </summary>
  76. protected DateTimeOffset? _AirsTime;
  77. /// <summary>
  78. /// When provided in a partial class, allows value of AirsTime to be changed before setting.
  79. /// </summary>
  80. partial void SetAirsTime(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
  81. /// <summary>
  82. /// When provided in a partial class, allows value of AirsTime to be changed before returning.
  83. /// </summary>
  84. partial void GetAirsTime(ref DateTimeOffset? result);
  85. /// <summary>
  86. /// The time the show airs, ignore the date portion.
  87. /// </summary>
  88. public DateTimeOffset? AirsTime
  89. {
  90. get
  91. {
  92. DateTimeOffset? value = _AirsTime;
  93. GetAirsTime(ref value);
  94. return _AirsTime = value;
  95. }
  96. set
  97. {
  98. DateTimeOffset? oldValue = _AirsTime;
  99. SetAirsTime(oldValue, ref value);
  100. if (oldValue != value)
  101. {
  102. _AirsTime = value;
  103. }
  104. }
  105. }
  106. /// <summary>
  107. /// Backing field for FirstAired.
  108. /// </summary>
  109. protected DateTimeOffset? _FirstAired;
  110. /// <summary>
  111. /// When provided in a partial class, allows value of FirstAired to be changed before setting.
  112. /// </summary>
  113. partial void SetFirstAired(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
  114. /// <summary>
  115. /// When provided in a partial class, allows value of FirstAired to be changed before returning.
  116. /// </summary>
  117. partial void GetFirstAired(ref DateTimeOffset? result);
  118. public DateTimeOffset? FirstAired
  119. {
  120. get
  121. {
  122. DateTimeOffset? value = _FirstAired;
  123. GetFirstAired(ref value);
  124. return _FirstAired = value;
  125. }
  126. set
  127. {
  128. DateTimeOffset? oldValue = _FirstAired;
  129. SetFirstAired(oldValue, ref value);
  130. if (oldValue != value)
  131. {
  132. _FirstAired = value;
  133. }
  134. }
  135. }
  136. /*************************************************************************
  137. * Navigation properties
  138. *************************************************************************/
  139. [ForeignKey("SeriesMetadata_SeriesMetadata_Id")]
  140. public virtual ICollection<SeriesMetadata> SeriesMetadata { get; protected set; }
  141. [ForeignKey("Season_Seasons_Id")]
  142. public virtual ICollection<Season> Seasons { get; protected set; }
  143. }
  144. }