Merge pull request 'Binding Search View models' (#3) from dev into registration

Reviewed-on: #3
This commit is contained in:
mfnefd 2024-06-04 11:58:43 +04:00
commit 6dfb7d91ef
7 changed files with 93 additions and 3 deletions

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.BindingModels
{
public class RoleBindingModel
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.BindingModels
{
public class UserBindingModel
{
public Guid Id { get; set; }
public string FirstName { get; set; } = string.Empty;
public string SecondName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string PasswordHash { get; set; } = string.Empty;
public DateTime Birthday { get; set; }
public RoleBindingModel Role { get; set; } = null!;
}
}

View File

@ -7,9 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="SearchModels\" />
<Folder Include="BindingModels\" />
<Folder Include="ViewModels\" />
<Folder Include="StorageContracts\" />
<Folder Include="BusinessLogicContracts\" />
</ItemGroup>

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.SearchModels
{
public class RoleSearchModel
{
public Guid? Id { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.SearchModels
{
public class UserSearchModel
{
public Guid? Id { get; set; }
public string? Email { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.ViewModels
{
public class RoleViewModel
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.ViewModels
{
public class UserViewModel
{
public Guid Id { get; set; }
public string FirstName { get; set; } = string.Empty;
public string SecondName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string PasswordHash { get; set; } = string.Empty;
public DateTime Birthday { get; set; }
public RoleViewModel Role { get; set; } = null!;
}
}