LibraryRoot.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 partial class LibraryRoot
  23. {
  24. partial void Init();
  25. /// <summary>
  26. /// Default constructor. Protected due to required properties, but present because EF needs it.
  27. /// </summary>
  28. protected LibraryRoot()
  29. {
  30. Init();
  31. }
  32. /// <summary>
  33. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
  34. /// </summary>
  35. public static LibraryRoot CreateLibraryRootUnsafe()
  36. {
  37. return new LibraryRoot();
  38. }
  39. /// <summary>
  40. /// Public constructor with required data
  41. /// </summary>
  42. /// <param name="path">Absolute Path</param>
  43. public LibraryRoot(string path)
  44. {
  45. if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
  46. this.Path = path;
  47. Init();
  48. }
  49. /// <summary>
  50. /// Static create function (for use in LINQ queries, etc.)
  51. /// </summary>
  52. /// <param name="path">Absolute Path</param>
  53. public static LibraryRoot Create(string path)
  54. {
  55. return new LibraryRoot(path);
  56. }
  57. /*************************************************************************
  58. * Properties
  59. *************************************************************************/
  60. /// <summary>
  61. /// Backing field for Id
  62. /// </summary>
  63. internal int _Id;
  64. /// <summary>
  65. /// When provided in a partial class, allows value of Id to be changed before setting.
  66. /// </summary>
  67. partial void SetId(int oldValue, ref int newValue);
  68. /// <summary>
  69. /// When provided in a partial class, allows value of Id to be changed before returning.
  70. /// </summary>
  71. partial void GetId(ref int result);
  72. /// <summary>
  73. /// Identity, Indexed, Required
  74. /// </summary>
  75. [Key]
  76. [Required]
  77. public int Id
  78. {
  79. get
  80. {
  81. int value = _Id;
  82. GetId(ref value);
  83. return (_Id = value);
  84. }
  85. protected set
  86. {
  87. int oldValue = _Id;
  88. SetId(oldValue, ref value);
  89. if (oldValue != value)
  90. {
  91. _Id = value;
  92. }
  93. }
  94. }
  95. /// <summary>
  96. /// Backing field for Path
  97. /// </summary>
  98. protected string _Path;
  99. /// <summary>
  100. /// When provided in a partial class, allows value of Path to be changed before setting.
  101. /// </summary>
  102. partial void SetPath(string oldValue, ref string newValue);
  103. /// <summary>
  104. /// When provided in a partial class, allows value of Path to be changed before returning.
  105. /// </summary>
  106. partial void GetPath(ref string result);
  107. /// <summary>
  108. /// Required, Max length = 65535
  109. /// Absolute Path
  110. /// </summary>
  111. [Required]
  112. [MaxLength(65535)]
  113. [StringLength(65535)]
  114. public string Path
  115. {
  116. get
  117. {
  118. string value = _Path;
  119. GetPath(ref value);
  120. return (_Path = value);
  121. }
  122. set
  123. {
  124. string oldValue = _Path;
  125. SetPath(oldValue, ref value);
  126. if (oldValue != value)
  127. {
  128. _Path = value;
  129. }
  130. }
  131. }
  132. /// <summary>
  133. /// Backing field for NetworkPath
  134. /// </summary>
  135. protected string _NetworkPath;
  136. /// <summary>
  137. /// When provided in a partial class, allows value of NetworkPath to be changed before setting.
  138. /// </summary>
  139. partial void SetNetworkPath(string oldValue, ref string newValue);
  140. /// <summary>
  141. /// When provided in a partial class, allows value of NetworkPath to be changed before returning.
  142. /// </summary>
  143. partial void GetNetworkPath(ref string result);
  144. /// <summary>
  145. /// Max length = 65535
  146. /// Absolute network path, for example for transcoding sattelites.
  147. /// </summary>
  148. [MaxLength(65535)]
  149. [StringLength(65535)]
  150. public string NetworkPath
  151. {
  152. get
  153. {
  154. string value = _NetworkPath;
  155. GetNetworkPath(ref value);
  156. return (_NetworkPath = value);
  157. }
  158. set
  159. {
  160. string oldValue = _NetworkPath;
  161. SetNetworkPath(oldValue, ref value);
  162. if (oldValue != value)
  163. {
  164. _NetworkPath = value;
  165. }
  166. }
  167. }
  168. /// <summary>
  169. /// Required
  170. /// </summary>
  171. [ConcurrencyCheck]
  172. [Required]
  173. public byte[] Timestamp { get; set; }
  174. /*************************************************************************
  175. * Navigation properties
  176. *************************************************************************/
  177. /// <summary>
  178. /// Required
  179. /// </summary>
  180. public virtual global::Jellyfin.Data.Entities.Library Library { get; set; }
  181. }
  182. }