You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.5 KiB
72 lines
2.5 KiB
4 years ago
|
#pragma warning disable CS1591
|
||
|
|
||
5 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
|
||
4 years ago
|
namespace Jellyfin.Data.Entities.Libraries
|
||
5 years ago
|
{
|
||
4 years ago
|
public partial class CustomItem : LibraryItem
|
||
|
{
|
||
|
partial void Init();
|
||
5 years ago
|
|
||
4 years ago
|
/// <summary>
|
||
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||
|
/// </summary>
|
||
4 years ago
|
protected CustomItem()
|
||
4 years ago
|
{
|
||
|
CustomItemMetadata = new HashSet<CustomItemMetadata>();
|
||
|
Releases = new HashSet<Release>();
|
||
5 years ago
|
|
||
4 years ago
|
Init();
|
||
|
}
|
||
5 years ago
|
|
||
4 years ago
|
/// <summary>
|
||
|
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||
|
/// </summary>
|
||
|
public static CustomItem CreateCustomItemUnsafe()
|
||
|
{
|
||
|
return new CustomItem();
|
||
|
}
|
||
5 years ago
|
|
||
4 years ago
|
/// <summary>
|
||
4 years ago
|
/// Public constructor with required data.
|
||
4 years ago
|
/// </summary>
|
||
|
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||
4 years ago
|
/// <param name="dateadded">The date the object was added.</param>
|
||
4 years ago
|
public CustomItem(Guid urlid, DateTime dateadded)
|
||
|
{
|
||
|
this.UrlId = urlid;
|
||
5 years ago
|
|
||
4 years ago
|
this.CustomItemMetadata = new HashSet<CustomItemMetadata>();
|
||
|
this.Releases = new HashSet<Release>();
|
||
5 years ago
|
|
||
4 years ago
|
Init();
|
||
|
}
|
||
5 years ago
|
|
||
4 years ago
|
/// <summary>
|
||
|
/// Static create function (for use in LINQ queries, etc.)
|
||
|
/// </summary>
|
||
|
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||
4 years ago
|
/// <param name="dateadded">The date the object was added.</param>
|
||
4 years ago
|
public static CustomItem Create(Guid urlid, DateTime dateadded)
|
||
|
{
|
||
|
return new CustomItem(urlid, dateadded);
|
||
|
}
|
||
5 years ago
|
|
||
4 years ago
|
/*************************************************************************
|
||
|
* Properties
|
||
|
*************************************************************************/
|
||
5 years ago
|
|
||
4 years ago
|
/*************************************************************************
|
||
|
* Navigation properties
|
||
|
*************************************************************************/
|
||
|
[ForeignKey("CustomItemMetadata_CustomItemMetadata_Id")]
|
||
|
public virtual ICollection<CustomItemMetadata> CustomItemMetadata { get; protected set; }
|
||
5 years ago
|
|
||
4 years ago
|
[ForeignKey("Release_Releases_Id")]
|
||
|
public virtual ICollection<Release> Releases { get; protected set; }
|
||
|
}
|
||
5 years ago
|
}
|
||
|
|