CustomItem.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 CustomItem: global::Jellyfin.Data.Entities.LibraryItem
  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 CustomItem(): base()
  29. {
  30. CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
  31. Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
  32. Init();
  33. }
  34. /// <summary>
  35. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
  36. /// </summary>
  37. public static CustomItem CreateCustomItemUnsafe()
  38. {
  39. return new CustomItem();
  40. }
  41. /// <summary>
  42. /// Public constructor with required data
  43. /// </summary>
  44. /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
  45. public CustomItem(Guid urlid, DateTime dateadded)
  46. {
  47. this.UrlId = urlid;
  48. this.CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
  49. this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
  50. Init();
  51. }
  52. /// <summary>
  53. /// Static create function (for use in LINQ queries, etc.)
  54. /// </summary>
  55. /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
  56. public static CustomItem Create(Guid urlid, DateTime dateadded)
  57. {
  58. return new CustomItem(urlid, dateadded);
  59. }
  60. /*************************************************************************
  61. * Properties
  62. *************************************************************************/
  63. /*************************************************************************
  64. * Navigation properties
  65. *************************************************************************/
  66. public virtual ICollection<global::Jellyfin.Data.Entities.CustomItemMetadata> CustomItemMetadata { get; protected set; }
  67. public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
  68. }
  69. }