UserService preparation

This commit is contained in:
ereshkigal 2024-09-07 12:45:00 +03:00
parent e1f9b65d84
commit 5eb296ffe3
6 changed files with 97 additions and 0 deletions

19
DTO/UserDto.cs Normal file
View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace renis_backend.DTO
{
public class UserDto
{
[Required]
public string Name { get; set; } = null!;
[Phone]
[Required]
public string Phone { get; set; } = null!;
[Required]
public string Password { get; set; } = null!;
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace renis_backend.Exceptions.User
{
public class UserException : System.Exception
{
public UserException() { }
public UserException(string message) : base(message) { }
public UserException(string message, System.Exception inner) : base(message, inner) { }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace renis_backend.Services.Polis
{
public interface IPolisService
{
public Task<IQueryable<Polis>> GetPolises();
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace renis_backend.Services.Users
{
public interface IUserService
{
public Task<string> GenerateUser();
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace renis_backend.Services.Users
{
public class UserService : IUserService
{
public async Task<string> GenerateUser()
{
throw new NotImplementedException();
}
}
}

25
renis-backend.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "renis-backend", "renis-backend.csproj", "{9D6F84D2-940C-43B1-862C-263D0D446BCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D6F84D2-940C-43B1-862C-263D0D446BCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D6F84D2-940C-43B1-862C-263D0D446BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D6F84D2-940C-43B1-862C-263D0D446BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D6F84D2-940C-43B1-862C-263D0D446BCF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55CAE896-5C10-4114-B9E4-78864BF912A0}
EndGlobalSection
EndGlobal