mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
33 lines
No EOL
957 B
C#
33 lines
No EOL
957 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.AspNetCore.Identity;
|
|
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; }
|
|
|
|
public string EmbyConnectUserId { get; set; }
|
|
|
|
public int? MovieRequestLimit { get; set; }
|
|
public int? EpisodeRequestLimit { get; set; }
|
|
|
|
public string UserAccessToken { get; set; }
|
|
|
|
[NotMapped]
|
|
public bool IsEmbyConnect => UserType == UserType.EmbyUser && EmbyConnectUserId.HasValue();
|
|
|
|
[NotMapped]
|
|
public string UserAlias => string.IsNullOrEmpty(Alias) ? UserName : Alias;
|
|
}
|
|
} |