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.
Connected.Common/Common/Security/Identity/User.cs

63 lines
1.2 KiB

using Connected.Annotations;
using Connected.Entities.Annotations;
using Connected.Entities.Consistency;
using Connected.Security.Identity;
namespace Common.Security.Identity;
[Table(Schema = SchemaAttribute.SysSchema)]
internal record class User : ConsistentEntity<int>, IUser, IUserPassport
{
public const string CacheKey = $"{SchemaAttribute.SysSchema}.{nameof(User)}";
[Length(32)]
[Ordinal(0)]
[Nullable]
public string? FirstName { get; init; }
[Length(64)]
[Ordinal(1)]
[Nullable]
public string? LastName { get; init; }
[Length(128)]
[Ordinal(2)]
[Nullable]
public string? LoginName { get; init; }
[Length(256)]
[Ordinal(3)]
[Nullable]
public string? Email { get; init; }
[Length(256)]
[Ordinal(4)]
[Nullable]
public string? TimeZone { get; init; }
[Ordinal(5)]
[Nullable]
public int Language { get; init; }
[Ordinal(6)]
[Nullable]
[Length(256)]
public byte[] Password { get; init; }
[Ordinal(7)]
[Nullable]
[Length(32)]
public byte[] Pin { get; init; }
[Ordinal(8)]
public UserStatus Status { get; init; }
[Nullable]
[Ordinal(9)]
public DateTime PasswordExpiration { get; init; }
[Nullable]
[Ordinal(10)]
public Guid AuthenticationToken { get; init; }
}