using Mirea.Api.Dto.Common; namespace Mirea.Api.Endpoint.Common.MapperDto; public static class PasswordPolicyConverter { public static Security.Common.Domain.PasswordPolicy ConvertFromDto(this PasswordPolicy policy) => new(policy.MinimumLength, policy.RequireLetter, policy.RequireLettersDifferentCase, policy.RequireDigit, policy.RequireSpecialCharacter); public static PasswordPolicy ConvertToDto(this Security.Common.Domain.PasswordPolicy policy) => new() { MinimumLength = policy.MinimumLength, RequireLetter = policy.RequireLetter, RequireDigit = policy.RequireDigit, RequireSpecialCharacter = policy.RequireSpecialCharacter, RequireLettersDifferentCase = policy.RequireLettersDifferentCase }; }