Collection.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 Collection
  23. {
  24. partial void Init();
  25. /// <summary>
  26. /// Default constructor
  27. /// </summary>
  28. public Collection()
  29. {
  30. CollectionItem = new System.Collections.Generic.LinkedList<global::Jellyfin.Data.Entities.CollectionItem>();
  31. Init();
  32. }
  33. /*************************************************************************
  34. * Properties
  35. *************************************************************************/
  36. /// <summary>
  37. /// Backing field for Id
  38. /// </summary>
  39. internal int _Id;
  40. /// <summary>
  41. /// When provided in a partial class, allows value of Id to be changed before setting.
  42. /// </summary>
  43. partial void SetId(int oldValue, ref int newValue);
  44. /// <summary>
  45. /// When provided in a partial class, allows value of Id to be changed before returning.
  46. /// </summary>
  47. partial void GetId(ref int result);
  48. /// <summary>
  49. /// Identity, Indexed, Required
  50. /// </summary>
  51. [Key]
  52. [Required]
  53. public int Id
  54. {
  55. get
  56. {
  57. int value = _Id;
  58. GetId(ref value);
  59. return (_Id = value);
  60. }
  61. protected set
  62. {
  63. int oldValue = _Id;
  64. SetId(oldValue, ref value);
  65. if (oldValue != value)
  66. {
  67. _Id = value;
  68. }
  69. }
  70. }
  71. /// <summary>
  72. /// Backing field for Name
  73. /// </summary>
  74. protected string _Name;
  75. /// <summary>
  76. /// When provided in a partial class, allows value of Name to be changed before setting.
  77. /// </summary>
  78. partial void SetName(string oldValue, ref string newValue);
  79. /// <summary>
  80. /// When provided in a partial class, allows value of Name to be changed before returning.
  81. /// </summary>
  82. partial void GetName(ref string result);
  83. /// <summary>
  84. /// Max length = 1024
  85. /// </summary>
  86. [MaxLength(1024)]
  87. [StringLength(1024)]
  88. public string Name
  89. {
  90. get
  91. {
  92. string value = _Name;
  93. GetName(ref value);
  94. return (_Name = value);
  95. }
  96. set
  97. {
  98. string oldValue = _Name;
  99. SetName(oldValue, ref value);
  100. if (oldValue != value)
  101. {
  102. _Name = value;
  103. }
  104. }
  105. }
  106. /// <summary>
  107. /// Required
  108. /// </summary>
  109. [ConcurrencyCheck]
  110. [Required]
  111. public byte[] Timestamp { get; set; }
  112. /*************************************************************************
  113. * Navigation properties
  114. *************************************************************************/
  115. public virtual ICollection<global::Jellyfin.Data.Entities.CollectionItem> CollectionItem { get; protected set; }
  116. }
  117. }