feat: Eigenschaften zu LogInDto für Validierung und Null-Prüfungen hinzugefügt

This commit is contained in:
Developer 02
2024-10-25 09:43:22 +02:00
parent 9c41e7bb18
commit 0495dc10de

View File

@@ -1,4 +1,9 @@
namespace WorkFlow.API.Models
{
public record LogInDto(int? UserId, string? Username, string Password);
public record LogInDto(int? UserId, string? Username, string Password)
{
public bool HasUserId => UserId is not null;
public bool HasUsername => Username is not null;
public bool IsInvalid => !HasUserId && !HasUsername;
};
}