refactor (readonly for static objects in tests and file-scoped namespaces
This commit is contained in:
		| @@ -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; } | ||||
| } | ||||
| @@ -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!; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user