вливаю всё, что было создано на 5, 6, 7 этапах в ветку main #12

Merged
ekallin merged 180 commits from stage7_user_web_interface_prototype into main 2024-05-01 19:15:20 +04:00
16 changed files with 81 additions and 77 deletions
Showing only changes of commit 6e91db5f8f - Show all commits

View File

@ -6,7 +6,7 @@ namespace PolyclinicContracts.BindingModels
{
public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public int ExecutorId { get; set; }
public int UserId { get; set; }
public int Id { get; set; }
}
}

View File

@ -1,12 +1,14 @@
using PolyclinicDataModels.Models;
using PolyclinicDataModels.Enums;
using PolyclinicDataModels.Models;
namespace PolyclinicContracts.BindingModels
{
public class ExecutorBindingModel : IExecutorModel
public class UserBindingModel : IUserModel
{
public string FIO { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public UserRole Role { get; set; } = UserRole.Неизвестный;
public int Id { get; set; }
}
}

View File

@ -1,15 +0,0 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IExecutorLogic
{
List<ExecutorViewModel>? ReadList(ExecutorSearchModel? model);
ExecutorViewModel? ReadElement(ExecutorSearchModel model);
bool Create(ExecutorBindingModel model);
bool Update(ExecutorBindingModel model);
bool Delete(ExecutorBindingModel model);
}
}

View File

@ -0,0 +1,15 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IUserLogic
{
List<UserViewModel>? ReadList(UserSearchModel? model);
UserViewModel? ReadElement(UserSearchModel model);
bool Create(UserBindingModel model);
bool Update(UserBindingModel model);
bool Delete(UserBindingModel model);
}
}

View File

@ -3,6 +3,6 @@
public class DiagnosisSearchModel
{
public int? Id { get; set; }
public int? ExecutorId { get; set; }
public int? UserId { get; set; }
}
}

View File

@ -1,6 +1,6 @@
namespace PolyclinicContracts.SearchModels
{
public class ExecutorSearchModel
public class UserSearchModel
{
public int? Id { get; set; }
public string? Email { get; set; }

View File

@ -1,16 +0,0 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.StoragesContracts
{
public interface IExecutorStorage
{
List<ExecutorViewModel> GetFullList();
List<ExecutorViewModel> GetFilteredList(ExecutorSearchModel model);
ExecutorViewModel? GetElement(ExecutorSearchModel model);
ExecutorViewModel? Insert(ExecutorBindingModel model);
ExecutorViewModel? Update(ExecutorBindingModel model);
ExecutorViewModel? Delete(ExecutorBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.StoragesContracts
{
public interface IUserStorage
{
List<UserViewModel> GetFullList();
List<UserViewModel> GetFilteredList(UserSearchModel model);
UserViewModel? GetElement(UserSearchModel model);
UserViewModel? Insert(UserBindingModel model);
UserViewModel? Update(UserBindingModel model);
UserViewModel? Delete(UserBindingModel model);
}
}

View File

@ -9,7 +9,7 @@ namespace PolyclinicContracts.ViewModels
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public int ExecutorId { get; set; }
public int UserId { get; set; }
public int Id { get; set; }
}
}

View File

@ -1,15 +0,0 @@
using PolyclinicDataModels.Models;
using System.ComponentModel;
namespace PolyclinicContracts.ViewModels
{
public class ExecutorViewModel : IExecutorModel
{
[DisplayName("ФИО исполнителя")]
public string FIO { get; set; } = string.Empty;
[DisplayName("Email исполнителя")]
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public int Id { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using PolyclinicDataModels.Enums;
using PolyclinicDataModels.Models;
using System.ComponentModel;
namespace PolyclinicContracts.ViewModels
{
public class UserViewModel : IUserModel
{
[DisplayName("ФИО")]
public string FIO { get; set; } = string.Empty;
[DisplayName("Email")]
public string Email { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Роль")]
public UserRole Role { get; set; } = UserRole.Неизвестный;
public int Id { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace PolyclinicDataModels.Enums
{
public enum UserRole
{
Неизвестный = -1,
Администратор = 0,
Исполнитель = 1,
Поручитель = 2
}
}

View File

@ -4,6 +4,6 @@
{
string Name { get; }
string Comment { get; }
int ExecutorId { get; }
int UserId { get; }
}
}

View File

@ -1,9 +0,0 @@
namespace PolyclinicDataModels.Models
{
public interface IExecutorModel : IId
{
string FIO { get; }
string Email { get; }
string Password { get; }
}
}

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
{
public interface ISuretorModel : IId
{
string FIO { get; }
string Password { get; }
string Email { get; }
}
}

View File

@ -0,0 +1,12 @@
using PolyclinicDataModels.Enums;
namespace PolyclinicDataModels.Models
{
public interface IUserModel : IId
{
string FIO { get; }
string Email { get; }
string Password { get; }
UserRole Role { get; }
}
}