Api domain items have been added but subject to change

This commit is contained in:
James Tombleson 2023-07-06 22:24:50 -07:00
parent dff5556e06
commit 06218af516
5 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace Newsbot.Collector.Api.Domain.Requests;
public class RegisterUserRequest
{
//public string? Name { get; set; }
[EmailAddress]
public string? Email { get; set; }
public string? Password { get; set; }
}

View File

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace Newsbot.Collector.Api.Domain.Requests;
public class UserLoginRequest
{
[EmailAddress]
public string? Email { get; set; }
public string? Password { get; set; }
}

View File

@ -0,0 +1,6 @@
namespace Newsbot.Collector.Api.Domain.Response;
public class AuthFailedResponse
{
public IEnumerable<string>? Errors { get; set; }
}

View File

@ -0,0 +1,8 @@
namespace Newsbot.Collector.Api.Domain.Response;
public class AuthSuccessfulResponse
{
// might want to validate the user before we return the token
public string? Token { get; set; }
}

View File

@ -0,0 +1,11 @@
using System.Collections;
namespace Newsbot.Collector.Api.Domain.Results;
public class AuthenticationResult
{
public string? Token { get; set; }
public bool IsSuccessful { get; set; }
public IEnumerable<string>? ErrorMessage { get; set; }
}