diff --git a/back/Contracts/DTOs/UserDTO.cs b/back/Contracts/DTOs/UserDTO.cs new file mode 100644 index 0000000..abf5f99 --- /dev/null +++ b/back/Contracts/DTOs/UserDTO.cs @@ -0,0 +1,9 @@ +namespace Contracts.DTO; + +public class UserDto +{ + public Guid? Id { get; set; } + public string? Username { get; set; } + public string? Password { get; set; } + public decimal? Balance { get; set; } +} \ No newline at end of file diff --git a/back/Contracts/Repositories/IUserRepo.cs b/back/Contracts/Repositories/IUserRepo.cs new file mode 100644 index 0000000..3785e5e --- /dev/null +++ b/back/Contracts/Repositories/IUserRepo.cs @@ -0,0 +1,12 @@ +using Contracts.DTO; +using Contracts.SearchModels; + +namespace Contracts.Repositories; + +public interface IUserRepo +{ + public Task Get(UserSearch search); + public Task Create(UserDto user); + public Task Update(UserDto user); + public Task Delete(UserSearch search); +} \ No newline at end of file diff --git a/back/Contracts/SearchModels/UserSearch.cs b/back/Contracts/SearchModels/UserSearch.cs new file mode 100644 index 0000000..7165750 --- /dev/null +++ b/back/Contracts/SearchModels/UserSearch.cs @@ -0,0 +1,6 @@ +namespace Contracts.SearchModels; + +public class UserSearch +{ + public Guid? Id { get; set; } +} \ No newline at end of file diff --git a/back/Contracts/Services/IAuthService.cs b/back/Contracts/Services/IAuthService.cs new file mode 100644 index 0000000..d6e5983 --- /dev/null +++ b/back/Contracts/Services/IAuthService.cs @@ -0,0 +1,12 @@ +using Contracts.DTO; +using Contracts.ViewModels; + +namespace Contracts.Services; + +public interface IAuthService +{ + public Task Login(); + public Task Register(UserDto user); + public Task UpdateUserData(UserDto user); + public Task Delete(Guid id); +} \ No newline at end of file diff --git a/back/Contracts/ViewModels/UserViewModel.cs b/back/Contracts/ViewModels/UserViewModel.cs new file mode 100644 index 0000000..9bf54dc --- /dev/null +++ b/back/Contracts/ViewModels/UserViewModel.cs @@ -0,0 +1,8 @@ +namespace Contracts.ViewModels; + +public class UserViewModel +{ + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; + public decimal Balance { get; set; } +} \ No newline at end of file