mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Added maxlength to SourceId text field in Metadata entity. Added extra fields to Person entity and adjusted SourceId length to 255. Added Extra Nuget deps for Relational databases and added Default Sqlite connection string. Made LibraryItem and Metadata abstract. Added artwork, changed DbSet names, added Seasons, added Genres, removed Language enum Add MediaFIleKind, add CustomVideos, add Books. Add AdditionalStream Updated GUIDs. Remove merge artifacts. Updated Language to use ISO-639-3 3 letter language codes. Added collections and concurrency tokens. Added chapters. Added Photos and renamed CustomVideo to CustomItem. Started adding fields. Added extra fields and Company entities. Implement a first pass of user permissions for the new database schema Upgrade to v2 of the addon. Commit generated files. Update comment, rename namespace and remove superflous field. Un-ignore any generated code. Clean up the model files and other left overs.
242 lines
8.3 KiB
C#
242 lines
8.3 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated from a template.
|
|
//
|
|
// Manual changes to this file may cause unexpected behavior in your application.
|
|
// Manual changes to this file will be overwritten if the code is regenerated.
|
|
//
|
|
// Produced by Entity Framework Visual Editor
|
|
// https://github.com/msawczyn/EFDesigner
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Jellyfin.Data.Entities
|
|
{
|
|
public partial class User
|
|
{
|
|
partial void Init();
|
|
|
|
/// <summary>
|
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
/// </summary>
|
|
protected User()
|
|
{
|
|
Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>();
|
|
Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
|
|
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
|
|
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
|
|
|
|
Init();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
|
/// </summary>
|
|
public static User CreateUserUnsafe()
|
|
{
|
|
return new User();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Public constructor with required data
|
|
/// </summary>
|
|
/// <param name="username"></param>
|
|
/// <param name="mustupdatepassword"></param>
|
|
/// <param name="audiolanguagepreference"></param>
|
|
/// <param name="authenticationproviderid"></param>
|
|
/// <param name="invalidloginattemptcount"></param>
|
|
/// <param name="subtitlemode"></param>
|
|
/// <param name="playdefaultaudiotrack"></param>
|
|
public User(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack)
|
|
{
|
|
if (string.IsNullOrEmpty(username)) throw new ArgumentNullException(nameof(username));
|
|
this.Username = username;
|
|
|
|
this.MustUpdatePassword = mustupdatepassword;
|
|
|
|
if (string.IsNullOrEmpty(audiolanguagepreference)) throw new ArgumentNullException(nameof(audiolanguagepreference));
|
|
this.AudioLanguagePreference = audiolanguagepreference;
|
|
|
|
if (string.IsNullOrEmpty(authenticationproviderid)) throw new ArgumentNullException(nameof(authenticationproviderid));
|
|
this.AuthenticationProviderId = authenticationproviderid;
|
|
|
|
this.InvalidLoginAttemptCount = invalidloginattemptcount;
|
|
|
|
if (string.IsNullOrEmpty(subtitlemode)) throw new ArgumentNullException(nameof(subtitlemode));
|
|
this.SubtitleMode = subtitlemode;
|
|
|
|
this.PlayDefaultAudioTrack = playdefaultaudiotrack;
|
|
|
|
this.Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>();
|
|
this.Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
|
|
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
|
|
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
|
|
|
|
Init();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Static create function (for use in LINQ queries, etc.)
|
|
/// </summary>
|
|
/// <param name="username"></param>
|
|
/// <param name="mustupdatepassword"></param>
|
|
/// <param name="audiolanguagepreference"></param>
|
|
/// <param name="authenticationproviderid"></param>
|
|
/// <param name="invalidloginattemptcount"></param>
|
|
/// <param name="subtitlemode"></param>
|
|
/// <param name="playdefaultaudiotrack"></param>
|
|
public static User Create(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack)
|
|
{
|
|
return new User(username, mustupdatepassword, audiolanguagepreference, authenticationproviderid, invalidloginattemptcount, subtitlemode, playdefaultaudiotrack);
|
|
}
|
|
|
|
/*************************************************************************
|
|
* Properties
|
|
*************************************************************************/
|
|
|
|
/// <summary>
|
|
/// Identity, Indexed, Required
|
|
/// </summary>
|
|
[Key]
|
|
[Required]
|
|
public Guid Id { get; protected set; }
|
|
|
|
/// <summary>
|
|
/// Required
|
|
/// </summary>
|
|
[ConcurrencyCheck]
|
|
[Required]
|
|
public byte[] LastLoginTimestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required, Max length = 255
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(255)]
|
|
[StringLength(255)]
|
|
public string Username { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 65535
|
|
/// </summary>
|
|
[MaxLength(65535)]
|
|
[StringLength(65535)]
|
|
public string Password { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required
|
|
/// </summary>
|
|
[Required]
|
|
public bool MustUpdatePassword { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required, Max length = 255
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(255)]
|
|
[StringLength(255)]
|
|
public string AudioLanguagePreference { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required, Max length = 255
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(255)]
|
|
[StringLength(255)]
|
|
public string AuthenticationProviderId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 65535
|
|
/// </summary>
|
|
[MaxLength(65535)]
|
|
[StringLength(65535)]
|
|
public string GroupedFolders { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required
|
|
/// </summary>
|
|
[Required]
|
|
public int InvalidLoginAttemptCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 65535
|
|
/// </summary>
|
|
[MaxLength(65535)]
|
|
[StringLength(65535)]
|
|
public string LatestItemExcludes { get; set; }
|
|
|
|
public int? LoginAttemptsBeforeLockout { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 65535
|
|
/// </summary>
|
|
[MaxLength(65535)]
|
|
[StringLength(65535)]
|
|
public string MyMediaExcludes { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 65535
|
|
/// </summary>
|
|
[MaxLength(65535)]
|
|
[StringLength(65535)]
|
|
public string OrderedViews { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required, Max length = 255
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(255)]
|
|
[StringLength(255)]
|
|
public string SubtitleMode { get; set; }
|
|
|
|
/// <summary>
|
|
/// Required
|
|
/// </summary>
|
|
[Required]
|
|
public bool PlayDefaultAudioTrack { get; set; }
|
|
|
|
/// <summary>
|
|
/// Max length = 255
|
|
/// </summary>
|
|
[MaxLength(255)]
|
|
[StringLength(255)]
|
|
public string SubtitleLanguagePrefernce { get; set; }
|
|
|
|
public bool? DisplayMissingEpisodes { get; set; }
|
|
|
|
public bool? DisplayCollectionsView { get; set; }
|
|
|
|
public bool? HidePlayedInLatest { get; set; }
|
|
|
|
public bool? RememberAudioSelections { get; set; }
|
|
|
|
public bool? RememberSubtitleSelections { get; set; }
|
|
|
|
public bool? EnableNextEpisodeAutoPlay { get; set; }
|
|
|
|
public bool? EnableUserPreferenceAccess { get; set; }
|
|
|
|
/*************************************************************************
|
|
* Navigation properties
|
|
*************************************************************************/
|
|
|
|
public virtual ICollection<global::Jellyfin.Data.Entities.Group> Groups { get; protected set; }
|
|
|
|
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> Permissions { get; protected set; }
|
|
|
|
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; }
|
|
|
|
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { get; protected set; }
|
|
|
|
}
|
|
}
|
|
|