fix user binding, user logic contract and add account exception

This commit is contained in:
mfnefd 2024-06-05 15:14:25 +04:00
parent c902050055
commit 4f472bce41
3 changed files with 26 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace Contracts.BindingModels
public string SecondName { get; set; } = string.Empty; public string SecondName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty; public string Email { get; set; } = string.Empty;
public string PasswordHash { get; set; } = string.Empty; public string PasswordHash { get; set; } = string.Empty;
public string? Password { get; set; }
public DateTime Birthday { get; set; } public DateTime Birthday { get; set; }
public RoleBindingModel Role { get; set; } = null!; public RoleBindingModel Role { get; set; } = null!;
} }

View File

@ -11,6 +11,8 @@ namespace Contracts.BusinessLogicContracts
{ {
public interface IUserLogic public interface IUserLogic
{ {
UserViewModel Login(UserBindingModel model);
UserViewModel Create(UserBindingModel model); UserViewModel Create(UserBindingModel model);
UserViewModel Update(UserBindingModel model); UserViewModel Update(UserBindingModel model);

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.Exceptions
{
public class AccountException : Exception
{
public AccountException()
{
}
public AccountException(string message) : base(message)
{
}
public AccountException(string message, Exception inner) : base(message, inner)
{
}
}
}