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.
Ombi/src/Ombi.Store/Entities/OmbiUser.cs

33 lines
957 B

using System;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Identity;
7 years ago
using Ombi.Helpers;
namespace Ombi.Store.Entities
{
public class OmbiUser : IdentityUser
{
public string Alias { get; set; }
public UserType UserType { get; set; }
/// <summary>
/// This will be the unique Plex/Emby user id reference
/// </summary>
public string ProviderUserId { get; set; }
public DateTime? LastLoggedIn { get; set; }
7 years ago
public string EmbyConnectUserId { get; set; }
public int? MovieRequestLimit { get; set; }
public int? EpisodeRequestLimit { get; set; }
public string UserAccessToken { get; set; }
7 years ago
[NotMapped]
public bool IsEmbyConnect => UserType == UserType.EmbyUser && EmbyConnectUserId.HasValue();
[NotMapped]
public string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
}
}