Основа для Contracts
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IDepartmentLogic
|
||||||
|
{
|
||||||
|
List<DepartmentViewModel>? ReadList(DepartmentSearchModel? searchModel);
|
||||||
|
DepartmentViewModel? ReadElement(DepartmentSearchModel searchModel);
|
||||||
|
bool Create(DepartmentBindingModel model);
|
||||||
|
bool Update(DepartmentBindingModel model);
|
||||||
|
bool Delete(DepartmentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IDoctorLogic
|
||||||
|
{
|
||||||
|
List<DoctorViewModel>? ReadList(DoctorSearchModel? searchModel);
|
||||||
|
DoctorViewModel? ReadElement(DoctorSearchModel searchModel);
|
||||||
|
bool Create(DoctorBindingModel model);
|
||||||
|
bool Update(DoctorBindingModel model);
|
||||||
|
bool Delete(DoctorBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
20
ClinicScheduleContracts/BusinesLogicContracts/INurseLogic.cs
Normal file
20
ClinicScheduleContracts/BusinesLogicContracts/INurseLogic.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface INurseLogic
|
||||||
|
{
|
||||||
|
List<NurseViewModel>? ReadList(NurseSearchModel? searchModel);
|
||||||
|
NurseViewModel? ReadElement(NurseSearchModel searchModel);
|
||||||
|
bool Create(NurseBindingModel model);
|
||||||
|
bool Update(NurseBindingModel model);
|
||||||
|
bool Delete(NurseBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IScheduleAssignmentLogic
|
||||||
|
{
|
||||||
|
List<ScheduleAssignmentViewModel>? ReadList(ScheduleAssignmentSearchModel? searchModel);
|
||||||
|
ScheduleAssignmentViewModel? ReadElement(ScheduleAssignmentSearchModel searchModel);
|
||||||
|
bool Create(ScheduleAssignmentBindingModel model);
|
||||||
|
bool Delete(ScheduleAssignmentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IScheduleLogic
|
||||||
|
{
|
||||||
|
List<ScheduleViewModel>? ReadList(ScheduleSearchModel? searchModel);
|
||||||
|
ScheduleViewModel? ReadElement(ScheduleSearchModel searchModel);
|
||||||
|
bool Create(ScheduleBindingModel model);
|
||||||
|
bool Update(ScheduleBindingModel model);
|
||||||
|
bool Delete(ScheduleBindingModel model);
|
||||||
|
|
||||||
|
ScheduleViewModel GenerateSchedule(int departmentId, DateTime date);
|
||||||
|
}
|
||||||
|
}
|
||||||
20
ClinicScheduleContracts/BusinesLogicContracts/IShiftLogic.cs
Normal file
20
ClinicScheduleContracts/BusinesLogicContracts/IShiftLogic.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IShiftLogic
|
||||||
|
{
|
||||||
|
List<ShiftViewModel>? ReadList(ShiftSearchModel? searchModel);
|
||||||
|
ShiftViewModel? ReadElement(ShiftSearchModel searchModel);
|
||||||
|
bool Create(ShiftBindingModel model);
|
||||||
|
bool Update(ShiftBindingModel model);
|
||||||
|
bool Delete(ShiftBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
20
ClinicScheduleContracts/BusinesLogicContracts/IUserLogic.cs
Normal file
20
ClinicScheduleContracts/BusinesLogicContracts/IUserLogic.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.BusinesLogicContracts
|
||||||
|
{
|
||||||
|
public interface IUserLogic
|
||||||
|
{
|
||||||
|
List<UserViewModel>? ReadList(UserSearchModel? searchModel);
|
||||||
|
UserViewModel? ReadElement(UserSearchModel searchModel);
|
||||||
|
bool Create(UserBindingModel model); // Для создания администраторов
|
||||||
|
bool Update(UserBindingModel model);
|
||||||
|
bool Delete(UserBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ScheduleAssignmentSearchModel
|
||||||
|
{
|
||||||
|
public int? scheduleId { get; set; }
|
||||||
|
public int? shiftId { get; set; }
|
||||||
|
public int? userId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
22
ClinicScheduleContracts/SearchModels/UserSearchModel.cs
Normal file
22
ClinicScheduleContracts/SearchModels/UserSearchModel.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using ClinicScheduleModels.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class UserSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
|
||||||
|
public string? Login { get; set; }
|
||||||
|
|
||||||
|
public Roles? Role { get; set; }
|
||||||
|
|
||||||
|
public string? Fullname { get; set; }
|
||||||
|
|
||||||
|
public string? PhoneNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IDepartmentStorage
|
||||||
|
{
|
||||||
|
List<DepartmentViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<DepartmentViewModel> GetFilteredList(DepartmentSearchModel model);
|
||||||
|
|
||||||
|
DepartmentViewModel? GetElement(DepartmentSearchModel model);
|
||||||
|
|
||||||
|
DepartmentViewModel? Insert(DepartmentBindingModel model);
|
||||||
|
|
||||||
|
DepartmentViewModel? Update(DepartmentBindingModel model);
|
||||||
|
|
||||||
|
DepartmentViewModel? Delete(DepartmentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ClinicScheduleContracts/StorageContracts/IDoctorStorage.cs
Normal file
26
ClinicScheduleContracts/StorageContracts/IDoctorStorage.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IDoctorStorage
|
||||||
|
{
|
||||||
|
List<DoctorViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<DoctorViewModel> GetFilteredList(DoctorSearchModel model);
|
||||||
|
|
||||||
|
DoctorViewModel? GetElement(DoctorSearchModel model);
|
||||||
|
|
||||||
|
DoctorViewModel? Insert(DoctorBindingModel model);
|
||||||
|
|
||||||
|
DoctorViewModel? Update(DoctorBindingModel model);
|
||||||
|
|
||||||
|
DoctorViewModel? Delete(DoctorBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ClinicScheduleContracts/StorageContracts/INurseStorage.cs
Normal file
26
ClinicScheduleContracts/StorageContracts/INurseStorage.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface INurseStorage
|
||||||
|
{
|
||||||
|
List<NurseViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<NurseViewModel> GetFilteredList(NurseSearchModel model);
|
||||||
|
|
||||||
|
NurseViewModel? GetElement(NurseSearchModel model);
|
||||||
|
|
||||||
|
NurseViewModel? Insert(NurseBindingModel model);
|
||||||
|
|
||||||
|
NurseViewModel? Update(NurseBindingModel model);
|
||||||
|
|
||||||
|
NurseViewModel? Delete(NurseBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IScheduleAssignmentStorage
|
||||||
|
{
|
||||||
|
List<ScheduleAssignmentViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<ScheduleAssignmentViewModel> GetFilteredList(ScheduleAssignmentSearchModel model);
|
||||||
|
|
||||||
|
ScheduleAssignmentViewModel? GetElement(ScheduleAssignmentSearchModel model);
|
||||||
|
|
||||||
|
ScheduleAssignmentViewModel? Insert(ScheduleAssignmentBindingModel model);
|
||||||
|
|
||||||
|
ScheduleAssignmentViewModel? Delete(ScheduleAssignmentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ClinicScheduleContracts/StorageContracts/IScheduleStorage.cs
Normal file
26
ClinicScheduleContracts/StorageContracts/IScheduleStorage.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IScheduleStorage
|
||||||
|
{
|
||||||
|
List<ScheduleViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<ScheduleViewModel> GetFilteredList(ScheduleSearchModel model);
|
||||||
|
|
||||||
|
ScheduleViewModel? GetElement(ScheduleSearchModel model);
|
||||||
|
|
||||||
|
ScheduleViewModel? Insert(ScheduleBindingModel model);
|
||||||
|
|
||||||
|
ScheduleViewModel? Update(ScheduleBindingModel model);
|
||||||
|
|
||||||
|
ScheduleViewModel? Delete(ScheduleBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ClinicScheduleContracts/StorageContracts/IShiftStorage.cs
Normal file
26
ClinicScheduleContracts/StorageContracts/IShiftStorage.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IShiftStorage
|
||||||
|
{
|
||||||
|
List<ShiftViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<ShiftViewModel> GetFilteredList(ShiftSearchModel model);
|
||||||
|
|
||||||
|
ShiftViewModel? GetElement(ShiftSearchModel model);
|
||||||
|
|
||||||
|
ShiftViewModel? Insert(ShiftBindingModel model);
|
||||||
|
|
||||||
|
ShiftViewModel? Update(ShiftBindingModel model);
|
||||||
|
|
||||||
|
ShiftViewModel? Delete(ShiftBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ClinicScheduleContracts/StorageContracts/IUserStorage.cs
Normal file
26
ClinicScheduleContracts/StorageContracts/IUserStorage.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ClinicScheduleContracts.BindingModels;
|
||||||
|
using ClinicScheduleContracts.SearchModels;
|
||||||
|
using ClinicScheduleContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.StorageContracts
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
19
ClinicScheduleContracts/ViewModels/DepartmentViewModel.cs
Normal file
19
ClinicScheduleContracts/ViewModels/DepartmentViewModel.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class DepartmentViewModel : IDepartmentModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Название отделения")]
|
||||||
|
public string name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
49
ClinicScheduleContracts/ViewModels/DoctorViewModel.cs
Normal file
49
ClinicScheduleContracts/ViewModels/DoctorViewModel.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using ClinicScheduleModels.Enums;
|
||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class DoctorViewModel : IDoctorModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Логин")]
|
||||||
|
public string login { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Пароль")]
|
||||||
|
public string password { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("ФИО")]
|
||||||
|
public string fullname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Дата рождения")]
|
||||||
|
public DateTime birthdate { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Телефон")]
|
||||||
|
public string phoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Даты отпуска")]
|
||||||
|
public List<DateTime> vacationDates { get; set; } = new();
|
||||||
|
|
||||||
|
[DisplayName("Роль")]
|
||||||
|
public Roles role => Roles.Doctor;
|
||||||
|
|
||||||
|
[DisplayName("Отработанные часы")]
|
||||||
|
public double workedHours { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Стаж (лет)")]
|
||||||
|
public int experienceYears { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ID отделения")]
|
||||||
|
public int departmentId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Специализация")]
|
||||||
|
public string specialization { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
47
ClinicScheduleContracts/ViewModels/NurseViewModel.cs
Normal file
47
ClinicScheduleContracts/ViewModels/NurseViewModel.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using ClinicScheduleModels.Enums;
|
||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class NurseViewModel : INurseModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Логин")]
|
||||||
|
public string login { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Пароль")]
|
||||||
|
public string password { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("ФИО")]
|
||||||
|
public string fullname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Дата рождения")]
|
||||||
|
public DateTime birthdate { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Телефон")]
|
||||||
|
public string phoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Даты отпуска")]
|
||||||
|
public List<DateTime> vacationDates { get; set; } = new();
|
||||||
|
|
||||||
|
[DisplayName("Роль")]
|
||||||
|
public Roles role => Roles.Nurse;
|
||||||
|
|
||||||
|
[DisplayName("Отработанные часы")]
|
||||||
|
public double workedHours { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Специализация")]
|
||||||
|
public string specialization { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("ID отделения")]
|
||||||
|
public int departmentId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ScheduleAssignmentViewModel : IScheduleAssignmentModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ID расписания")]
|
||||||
|
public int scheduleId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ID смены")]
|
||||||
|
public int shiftId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Пользователь")]
|
||||||
|
public IUserModel user { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
29
ClinicScheduleContracts/ViewModels/ScheduleViewModel.cs
Normal file
29
ClinicScheduleContracts/ViewModels/ScheduleViewModel.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ScheduleViewModel : IScheduleModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Дата расписания")]
|
||||||
|
public DateTime date { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ID отделения")]
|
||||||
|
public int departmentId { get; set; }
|
||||||
|
|
||||||
|
public List<IShiftModel> shifts { get; set; } = new();
|
||||||
|
|
||||||
|
public Dictionary<int, List<IDoctorModel>> shiftDoctors { get; set; } = new();
|
||||||
|
|
||||||
|
public Dictionary<int, List<INurseModel>> shiftNurses { get; set; } = new();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
33
ClinicScheduleContracts/ViewModels/ShiftViewModel.cs
Normal file
33
ClinicScheduleContracts/ViewModels/ShiftViewModel.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ShiftViewModel : IShiftModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Время начала")]
|
||||||
|
public DateTime startTime { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Время окончания")]
|
||||||
|
public DateTime endTime { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Требуемое количество докторов")]
|
||||||
|
public int requiredDoctors { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Требуемое количество медсестёр")]
|
||||||
|
public int requiredNurses { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ID отделения")]
|
||||||
|
public int departmentId { get; set; }
|
||||||
|
|
||||||
|
public double durationHours => (endTime - startTime).TotalHours;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
40
ClinicScheduleContracts/ViewModels/UserViewModel.cs
Normal file
40
ClinicScheduleContracts/ViewModels/UserViewModel.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using ClinicScheduleModels.Enums;
|
||||||
|
using ClinicScheduleModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ClinicScheduleContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class UserViewModel : IUserModel
|
||||||
|
{
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Логин")]
|
||||||
|
public string login { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Пароль")]
|
||||||
|
public string password { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("ФИО")]
|
||||||
|
public string fullname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Дата рождения")]
|
||||||
|
public DateTime birthdate { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Телефон")]
|
||||||
|
public string phoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Даты отпуска")]
|
||||||
|
public List<DateTime> vacationDates { get; set; } = new();
|
||||||
|
|
||||||
|
[DisplayName("Роль")]
|
||||||
|
public Roles role { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Отработанные часы")]
|
||||||
|
public double workedHours { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user