mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 03:43:11 +00:00
Both hosts now apply the same Identity password rule: at least 6 characters with one uppercase letter, one number and one special character. Change password requires an authenticated caller, verifies the current password before evaluating the new one, and reports a policy rejection separately from a wrong current password.
86 lines
2.5 KiB
C#
86 lines
2.5 KiB
C#
namespace SeaHaven.Services.DTOs
|
|
{
|
|
public class LoginResultDTO
|
|
{
|
|
public string Token { get; set; } = string.Empty;
|
|
public DateTime Expiration { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? UserRole { get; set; }
|
|
public string? PhoneNumber { get; set; }
|
|
public string Fullname { get; set; } = string.Empty;
|
|
public string Id { get; set; } = string.Empty;
|
|
}
|
|
|
|
public enum ChangePasswordStatus
|
|
{
|
|
Succeeded,
|
|
CurrentPasswordIncorrect,
|
|
PasswordRejected
|
|
}
|
|
|
|
public sealed class ChangePasswordResultDTO
|
|
{
|
|
public ChangePasswordStatus Status { get; init; }
|
|
}
|
|
|
|
public class UpdateProfileRequestDTO
|
|
{
|
|
public string? Name { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Contact { get; set; }
|
|
}
|
|
|
|
public class UserProfileDTO
|
|
{
|
|
public string? FirstName { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Contact { get; set; }
|
|
}
|
|
|
|
public class AddUserRequestDTO
|
|
{
|
|
public string? Name { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Contact { get; set; }
|
|
public string? Role { get; set; }
|
|
public int? AccountId { get; set; }
|
|
}
|
|
|
|
public class AddUserOutcomeDTO
|
|
{
|
|
public bool Success { get; set; }
|
|
public string? Error { get; set; }
|
|
}
|
|
|
|
public class EditUserRequestDTO
|
|
{
|
|
public string? Id { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Role { get; set; }
|
|
public int? AccountId { get; set; }
|
|
}
|
|
|
|
public class UserListRowDTO
|
|
{
|
|
public string? RoleName { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Name { get; set; }
|
|
public string Date { get; set; } = string.Empty;
|
|
public string? Status { get; set; }
|
|
public string? Id { get; set; }
|
|
public string? Phone { get; set; }
|
|
public string? Color { get; set; }
|
|
public bool? PendingRegistration { get; set; }
|
|
public IReadOnlyList<string> ServiceAreas { get; set; } = Array.Empty<string>();
|
|
}
|
|
|
|
public class UserProfileRowDTO
|
|
{
|
|
public string? Id { get; set; }
|
|
public string? Name { get; set; }
|
|
public DateTime? AddedDate { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Contact { get; set; }
|
|
}
|
|
}
|