Files
admin/Azaion.Common/Entities/User.cs
T
Oleksandr Bezdieniezhnykh 88c7b288df [AZ-199] [AZ-200] [AZ-201] [AZ-202] Fix API bugs
Made-with: Cursor
2026-04-16 06:55:11 +03:00

34 lines
981 B
C#

using System.Text.Json.Serialization;
namespace Azaion.Common.Entities;
public class User
{
public Guid Id { get; set; }
public string Email { get; set; } = null!;
[JsonIgnore]
public string PasswordHash { get; set; } = null!;
public string? Hardware { get; set; }
public RoleEnum Role { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? LastLogin { get; set; }
public UserConfig? UserConfig { get; set; } = null!;
public bool IsEnabled { get; set; }
public static string GetCacheKey(string email) =>
string.IsNullOrEmpty(email) ? "" : $"{nameof(User)}.{email}";
}
public class UserConfig
{
public UserQueueOffsets? QueueOffsets { get; set; } = new();
}
public class UserQueueOffsets
{
public ulong AnnotationsOffset { get; set; }
public ulong AnnotationsConfirmOffset { get; set; }
public ulong AnnotationsCommandsOffset { get; set; }
}