#pragma warning disable CS1591
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Jellyfin.Data.Entities.Libraries
{
public abstract partial class LibraryItem
{
partial void Init();
///
/// Default constructor. Protected due to being abstract.
///
protected LibraryItem()
{
Init();
}
///
/// Public constructor with required data.
///
/// This is whats gets displayed in the Urls and API requests. This could also be a string.
/// The date the object was added.
protected LibraryItem(Guid urlid, DateTime dateadded)
{
this.UrlId = urlid;
Init();
}
/*************************************************************************
* Properties
*************************************************************************/
///
/// Backing field for Id.
///
internal int _Id;
///
/// When provided in a partial class, allows value of Id to be changed before setting.
///
partial void SetId(int oldValue, ref int newValue);
///
/// When provided in a partial class, allows value of Id to be changed before returning.
///
partial void GetId(ref int result);
///
/// Identity, Indexed, Required.
///
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
{
int value = _Id;
GetId(ref value);
return _Id = value;
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
}
}
///
/// Backing field for UrlId.
///
internal Guid _UrlId;
///
/// When provided in a partial class, allows value of UrlId to be changed before setting.
///
partial void SetUrlId(Guid oldValue, ref Guid newValue);
///
/// When provided in a partial class, allows value of UrlId to be changed before returning.
///
partial void GetUrlId(ref Guid result);
///
/// Indexed, Required
/// This is whats gets displayed in the Urls and API requests. This could also be a string.
///
[Required]
public Guid UrlId
{
get
{
Guid value = _UrlId;
GetUrlId(ref value);
return _UrlId = value;
}
set
{
Guid oldValue = _UrlId;
SetUrlId(oldValue, ref value);
if (oldValue != value)
{
_UrlId = value;
}
}
}
///
/// Backing field for DateAdded.
///
protected DateTime _DateAdded;
///
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
///
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
///
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
///
partial void GetDateAdded(ref DateTime result);
///
/// Required.
///
[Required]
public DateTime DateAdded
{
get
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
return _DateAdded = value;
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{
_DateAdded = value;
}
}
}
///
/// Required, ConcurrenyToken.
///
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
///
/// Required.
///
[ForeignKey("LibraryRoot_Id")]
public virtual LibraryRoot LibraryRoot { get; set; }
}
}