Files
mixtape/zero.Core/Entities/User/BackofficeUser.cs
T

102 lines
2.2 KiB
C#
Raw Normal View History

using System;
2020-03-24 20:30:03 +01:00
using System.Collections.Generic;
2020-07-06 14:35:58 +02:00
using zero.Core.Attributes;
2020-11-11 13:44:52 +01:00
using zero.Core.Identity;
2020-03-24 20:30:03 +01:00
2020-03-24 23:09:29 +01:00
namespace zero.Core.Entities
2020-03-24 20:30:03 +01:00
{
public class BackofficeUser : ZeroEntity, IBackofficeUser
2020-03-24 20:30:03 +01:00
{
2020-11-04 01:25:38 +01:00
/// <inheritdoc />
public string Username { get; set; }
/// <inheritdoc />
public string AppId { get; set; }
2020-05-20 16:09:56 +02:00
/// <inheritdoc />
public string CurrentAppId { get; set; }
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
public bool IsSuper { get; set; }
/// <inheritdoc/>
public string Email { get; set; }
2020-04-14 20:16:04 +02:00
/// <inheritdoc/>
public bool IsEmailConfirmed { get; set; }
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
public string PasswordHash { get; set; }
/// <inheritdoc/>
public string SecurityStamp { get; set; }
/// <inheritdoc/>
2020-11-24 12:02:11 +01:00
public string AvatarId { get; set; }
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
2020-10-12 13:14:23 +02:00
public string LanguageId { get; set; }
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
public List<string> RoleIds { get; set; } = new List<string>();
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
2020-04-14 20:16:04 +02:00
public List<IUserClaim> Claims { get; set; } = new List<IUserClaim>();
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
2020-04-14 20:16:04 +02:00
public int AccessFailedCount { get; set; }
2020-03-24 20:30:03 +01:00
/// <inheritdoc/>
2020-04-14 20:16:04 +02:00
public bool LockoutEnabled { get; set; }
/// <inheritdoc/>
public DateTimeOffset? LockoutEnd { get; set; }
2020-03-24 20:30:03 +01:00
///// <inheritdoc/>
//public bool TwoFactorEnabled { get; set; }
2020-03-24 20:30:03 +01:00
///// <inheritdoc/>
//public string TwoFactorAuthenticatorKey { get; set; }
2020-03-24 20:30:03 +01:00
///// <inheritdoc/>
//public List<string> TwoFactorRecoveryCodes { get; set; } = new List<string>();
2020-03-24 20:30:03 +01:00
}
[Collection("Users")]
2020-11-14 12:34:26 +01:00
public interface IBackofficeUser : IZeroEntity, IZeroDbConventions, IIdentityUserWithRoles
2020-03-24 20:30:03 +01:00
{
/// <summary>
2020-11-16 01:07:07 +01:00
/// Application the user registered in
/// </summary>
2020-11-16 01:07:07 +01:00
string AppId { get; set; }
2020-05-20 16:09:56 +02:00
/// <summary>
/// Currently selected app id for the backoffice
/// </summary>
2020-11-16 01:07:07 +01:00
string CurrentAppId { get; set; }
2020-05-20 16:09:56 +02:00
2020-03-24 20:30:03 +01:00
/// <summary>
/// sudo.
/// The user who created the instance.
/// </summary>
bool IsSuper { get; set; }
/// <summary>
/// Avatar image
/// </summary>
2020-11-24 12:02:11 +01:00
string AvatarId { get; set; }
2020-03-24 20:30:03 +01:00
/// <summary>
/// Backoffice display language
/// </summary>
2020-10-12 13:14:23 +02:00
string LanguageId { get; set; }
2020-03-24 20:30:03 +01:00
}
}