refactor (readonly for static objects in tests and file-scoped namespaces

This commit is contained in:
2024-09-22 17:34:29 +03:00
parent 1625764e0a
commit a80076e2e6
50 changed files with 1196 additions and 1246 deletions

View File

@@ -1,16 +1,15 @@
using System.ComponentModel.DataAnnotations;
using Domains;
namespace ApplicationLayer.Services.Users.Models
{
/// Auth data with nullable password for making change auth data requests
public class ChangeAuthData
{
[Required]
[MaxLength(ConfigurationConstraints.EmailLength)]
public string Email { get; set; } = null!;
namespace ApplicationLayer.Services.Users.Models;
[MaxLength(ConfigurationConstraints.PasswordLength)]
public string? Password { get; set; }
}
}
/// Auth data with nullable password for making change auth data requests
public class ChangeAuthData
{
[Required]
[MaxLength(ConfigurationConstraints.EmailLength)]
public string Email { get; set; } = null!;
[MaxLength(ConfigurationConstraints.PasswordLength)]
public string? Password { get; set; }
}

View File

@@ -1,16 +1,15 @@
using System.ComponentModel.DataAnnotations;
using Domains;
namespace ApplicationLayer.Services.Users.Models
{
public class UserModel
{
/// Unique Identifier of user
[Required]
public Guid Id { get; private set; } = Guid.NewGuid();
namespace ApplicationLayer.Services.Users.Models;
[Required]
[MaxLength(ConfigurationConstraints.EmailLength)]
public string Email { get; set; } = null!;
}
}
public class UserModel
{
/// Unique Identifier of user
[Required]
public Guid Id { get; private set; } = Guid.NewGuid();
[Required]
[MaxLength(ConfigurationConstraints.EmailLength)]
public string Email { get; set; } = null!;
}