//------------------------------------------------------------------------------
//
// 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
//
//------------------------------------------------------------------------------
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();
///
/// Default constructor. Protected due to required properties, but present because EF needs it.
///
protected User()
{
Groups = new System.Collections.Generic.HashSet();
Permissions = new System.Collections.Generic.HashSet();
ProviderMappings = new System.Collections.Generic.HashSet();
Preferences = new System.Collections.Generic.HashSet();
Init();
}
///
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
///
public static User CreateUserUnsafe()
{
return new User();
}
///
/// Public constructor with required data
///
///
///
///
///
///
///
///
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();
this.Permissions = new System.Collections.Generic.HashSet();
this.ProviderMappings = new System.Collections.Generic.HashSet();
this.Preferences = new System.Collections.Generic.HashSet();
Init();
}
///
/// Static create function (for use in LINQ queries, etc.)
///
///
///
///
///
///
///
///
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
*************************************************************************/
///
/// Identity, Indexed, Required
///
[Key]
[Required]
public Guid Id { get; protected set; }
///
/// Required
///
[ConcurrencyCheck]
[Required]
public byte[] LastLoginTimestamp { get; set; }
///
/// Required, Max length = 255
///
[Required]
[MaxLength(255)]
[StringLength(255)]
public string Username { get; set; }
///
/// Max length = 65535
///
[MaxLength(65535)]
[StringLength(65535)]
public string Password { get; set; }
///
/// Required
///
[Required]
public bool MustUpdatePassword { get; set; }
///
/// Required, Max length = 255
///
[Required]
[MaxLength(255)]
[StringLength(255)]
public string AudioLanguagePreference { get; set; }
///
/// Required, Max length = 255
///
[Required]
[MaxLength(255)]
[StringLength(255)]
public string AuthenticationProviderId { get; set; }
///
/// Max length = 65535
///
[MaxLength(65535)]
[StringLength(65535)]
public string GroupedFolders { get; set; }
///
/// Required
///
[Required]
public int InvalidLoginAttemptCount { get; set; }
///
/// Max length = 65535
///
[MaxLength(65535)]
[StringLength(65535)]
public string LatestItemExcludes { get; set; }
public int? LoginAttemptsBeforeLockout { get; set; }
///
/// Max length = 65535
///
[MaxLength(65535)]
[StringLength(65535)]
public string MyMediaExcludes { get; set; }
///
/// Max length = 65535
///
[MaxLength(65535)]
[StringLength(65535)]
public string OrderedViews { get; set; }
///
/// Required, Max length = 255
///
[Required]
[MaxLength(255)]
[StringLength(255)]
public string SubtitleMode { get; set; }
///
/// Required
///
[Required]
public bool PlayDefaultAudioTrack { get; set; }
///
/// Max length = 255
///
[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 Groups { get; protected set; }
public virtual ICollection Permissions { get; protected set; }
public virtual ICollection ProviderMappings { get; protected set; }
public virtual ICollection Preferences { get; protected set; }
}
}