LibraryItem.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated from a template.
  4. //
  5. // Manual changes to this file may cause unexpected behavior in your application.
  6. // Manual changes to this file will be overwritten if the code is regenerated.
  7. //
  8. // Produced by Entity Framework Visual Editor
  9. // https://github.com/msawczyn/EFDesigner
  10. // </auto-generated>
  11. //------------------------------------------------------------------------------
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Collections.ObjectModel;
  15. using System.ComponentModel;
  16. using System.ComponentModel.DataAnnotations;
  17. using System.ComponentModel.DataAnnotations.Schema;
  18. using System.Linq;
  19. using System.Runtime.CompilerServices;
  20. namespace Jellyfin.Data.Entities
  21. {
  22. public abstract partial class LibraryItem
  23. {
  24. partial void Init();
  25. /// <summary>
  26. /// Default constructor. Protected due to being abstract.
  27. /// </summary>
  28. protected LibraryItem()
  29. {
  30. Init();
  31. }
  32. /// <summary>
  33. /// Public constructor with required data
  34. /// </summary>
  35. /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
  36. protected LibraryItem(Guid urlid, DateTime dateadded)
  37. {
  38. this.UrlId = urlid;
  39. Init();
  40. }
  41. /*************************************************************************
  42. * Properties
  43. *************************************************************************/
  44. /// <summary>
  45. /// Backing field for Id
  46. /// </summary>
  47. internal int _Id;
  48. /// <summary>
  49. /// When provided in a partial class, allows value of Id to be changed before setting.
  50. /// </summary>
  51. partial void SetId(int oldValue, ref int newValue);
  52. /// <summary>
  53. /// When provided in a partial class, allows value of Id to be changed before returning.
  54. /// </summary>
  55. partial void GetId(ref int result);
  56. /// <summary>
  57. /// Identity, Indexed, Required
  58. /// </summary>
  59. [Key]
  60. [Required]
  61. public int Id
  62. {
  63. get
  64. {
  65. int value = _Id;
  66. GetId(ref value);
  67. return (_Id = value);
  68. }
  69. protected set
  70. {
  71. int oldValue = _Id;
  72. SetId(oldValue, ref value);
  73. if (oldValue != value)
  74. {
  75. _Id = value;
  76. }
  77. }
  78. }
  79. /// <summary>
  80. /// Backing field for UrlId
  81. /// </summary>
  82. internal Guid _UrlId;
  83. /// <summary>
  84. /// When provided in a partial class, allows value of UrlId to be changed before setting.
  85. /// </summary>
  86. partial void SetUrlId(Guid oldValue, ref Guid newValue);
  87. /// <summary>
  88. /// When provided in a partial class, allows value of UrlId to be changed before returning.
  89. /// </summary>
  90. partial void GetUrlId(ref Guid result);
  91. /// <summary>
  92. /// Indexed, Required
  93. /// This is whats gets displayed in the Urls and API requests. This could also be a string.
  94. /// </summary>
  95. [Required]
  96. public Guid UrlId
  97. {
  98. get
  99. {
  100. Guid value = _UrlId;
  101. GetUrlId(ref value);
  102. return (_UrlId = value);
  103. }
  104. set
  105. {
  106. Guid oldValue = _UrlId;
  107. SetUrlId(oldValue, ref value);
  108. if (oldValue != value)
  109. {
  110. _UrlId = value;
  111. }
  112. }
  113. }
  114. /// <summary>
  115. /// Backing field for DateAdded
  116. /// </summary>
  117. protected DateTime _DateAdded;
  118. /// <summary>
  119. /// When provided in a partial class, allows value of DateAdded to be changed before setting.
  120. /// </summary>
  121. partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
  122. /// <summary>
  123. /// When provided in a partial class, allows value of DateAdded to be changed before returning.
  124. /// </summary>
  125. partial void GetDateAdded(ref DateTime result);
  126. /// <summary>
  127. /// Required
  128. /// </summary>
  129. [Required]
  130. public DateTime DateAdded
  131. {
  132. get
  133. {
  134. DateTime value = _DateAdded;
  135. GetDateAdded(ref value);
  136. return (_DateAdded = value);
  137. }
  138. internal set
  139. {
  140. DateTime oldValue = _DateAdded;
  141. SetDateAdded(oldValue, ref value);
  142. if (oldValue != value)
  143. {
  144. _DateAdded = value;
  145. }
  146. }
  147. }
  148. /// <summary>
  149. /// Required
  150. /// </summary>
  151. [ConcurrencyCheck]
  152. [Required]
  153. public byte[] Timestamp { get; set; }
  154. /*************************************************************************
  155. * Navigation properties
  156. *************************************************************************/
  157. /// <summary>
  158. /// Required
  159. /// </summary>
  160. public virtual global::Jellyfin.Data.Entities.LibraryRoot LibraryRoot { get; set; }
  161. }
  162. }