55 lines
2.0 KiB
C#
55 lines
2.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace PostFundManagement.Domain.Models.Security;
|
|
|
|
public sealed class UserLockOutRequest
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public string? UserId { get; set; }
|
|
|
|
[JsonPropertyName("userName")]
|
|
public string? UserName { get; set; }
|
|
|
|
[JsonPropertyName("email")]
|
|
public string? Email { get; set; }
|
|
|
|
[JsonPropertyName("emailConfirmed")]
|
|
public bool EmailConfirmed { get; set; }
|
|
|
|
[JsonPropertyName("phoneNumber")]
|
|
public string? PhoneNumber { get; set; }
|
|
|
|
[JsonPropertyName("phoneNumberConfirmed")]
|
|
public bool PhoneNumberConfirmed { get; set; }
|
|
|
|
[JsonPropertyName("LockoutEnabled")]
|
|
public bool LockoutEnabled { get; set; }
|
|
|
|
[JsonPropertyName("twoFactorEnabled")]
|
|
public bool TwoFactorEnabled { get; set; }
|
|
|
|
[JsonPropertyName("accessFailedCount")]
|
|
public int AccessFailedCount { get; set; }
|
|
|
|
[JsonPropertyName("lockoutEnd")]
|
|
public DateTimeOffset? LockoutEnd { get; set; }
|
|
}
|
|
|
|
public sealed record AddUserClaimRequest([Required] Guid UserId,
|
|
[Required] int ClaimId,
|
|
[Required][MaxLength(LabelLength)] string ClaimType,
|
|
[Required][MaxLength(LabelLength)] string ClaimValue);
|
|
|
|
public sealed record CreateUserRequest(string UserName, string Email, string Password, bool EmailConfirmed = true, string? PhoneNumber = null, bool PhoneNumberConfirmed = false);
|
|
|
|
public sealed record UpdateUserRequest(string UserId, string UserName, string Email, bool EmailConfirmed, string? PhoneNumber, bool PhoneNumberConfirmed, bool LockoutEnabled, DateTimeOffset? LockoutEnd, int AccessFailedCount, bool TwoFactorEnabled);
|
|
|
|
public sealed record Claim(string ClaimType, string ClaimValue, int? ClaimId = null);
|
|
|
|
public sealed record ClaimsResponse(int TotalCount, int PageSize, ICollection<Claim> Claims);
|
|
|
|
public sealed record UserResponse(string Id, string UserName, string Email, bool IsLockedOut, bool LockoutEnabled);
|
|
|
|
public sealed record Role(string Id, string Name);
|
|
|
|
public sealed record RolesResponse(int TotalCount, int PageSize, ICollection<Role> Roles); |