контракты раз
This commit is contained in:
parent
37383c61c7
commit
9dee23c18a
@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34024.191
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFimDataModels", "LawFimDataModels\LawFimDataModels.csproj", "{CE9CFF55-C5BC-4089-A425-1823AE4E74DD}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFimDataModels", "LawFimDataModels\LawFimDataModels.csproj", "{CE9CFF55-C5BC-4089-A425-1823AE4E74DD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmContracts", "LawFirmContracts\LawFirmContracts.csproj", "{61348245-9074-4C17-9698-7603F41E1D94}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -15,6 +17,10 @@ Global
|
||||
{CE9CFF55-C5BC-4089-A425-1823AE4E74DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CE9CFF55-C5BC-4089-A425-1823AE4E74DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CE9CFF55-C5BC-4089-A425-1823AE4E74DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{61348245-9074-4C17-9698-7603F41E1D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{61348245-9074-4C17-9698-7603F41E1D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{61348245-9074-4C17-9698-7603F41E1D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{61348245-9074-4C17-9698-7603F41E1D94}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1,7 +0,0 @@
|
||||
namespace LawFimDataModels.Models
|
||||
{
|
||||
public interface IRoleModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace LawFimDataModels.Models
|
||||
{
|
||||
public interface IUserModel : IId
|
||||
{
|
||||
string FIO { get; }
|
||||
string Email { get; }
|
||||
string Password { get; }
|
||||
int RoleId { get; }
|
||||
}
|
||||
}
|
16
LawFim/LawFirmContracts/BindingModels/CaseBindingModel.cs
Normal file
16
LawFim/LawFirmContracts/BindingModels/CaseBindingModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using LawFimDataModels.Enums;
|
||||
using LawFimDataModels.Models;
|
||||
|
||||
namespace LawFirmContracts.BindingModels
|
||||
{
|
||||
public class CaseBindingModel : ICaseModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public CaseStatus Status { get; set; } = CaseStatus.Неизвестен;
|
||||
public string CaseType { get; set; } = string.Empty;
|
||||
public DateTime DateCreate { get; set; }
|
||||
public DateTime? DateImplement { get; set; }
|
||||
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
||||
}
|
||||
}
|
12
LawFim/LawFirmContracts/BindingModels/ClientBindingModel.cs
Normal file
12
LawFim/LawFirmContracts/BindingModels/ClientBindingModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using LawFimDataModels.Models;
|
||||
|
||||
namespace LawFirmContracts.BindingModels
|
||||
{
|
||||
public class ClientBindingModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
12
LawFim/LawFirmContracts/BindingModels/VisitBindingModel.cs
Normal file
12
LawFim/LawFirmContracts/BindingModels/VisitBindingModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using LawFimDataModels.Models;
|
||||
|
||||
namespace LawFirmContracts.BindingModels
|
||||
{
|
||||
public class VisitBindingModel : IVisitModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime VisitDate { get; set; }
|
||||
public int HearingId { get; set; }
|
||||
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
||||
}
|
||||
}
|
20
LawFim/LawFirmContracts/BusinessLogicContracts/ICaseLogic.cs
Normal file
20
LawFim/LawFirmContracts/BusinessLogicContracts/ICaseLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using LawFimDataModels.Models;
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface ICaseLogic
|
||||
{
|
||||
List<CaseViewModel>? ReadList(CaseSearchModel? model);
|
||||
CaseViewModel? ReadElement(CaseSearchModel model);
|
||||
bool CreateCase(CaseBindingModel model);
|
||||
bool CaseAnalysis(CaseBindingModel model);
|
||||
bool CaseHearing(CaseBindingModel model);
|
||||
bool CloseCase(CaseBindingModel model);
|
||||
bool DeleteCase(CaseBindingModel model);
|
||||
bool AddClientToCase(CaseSearchModel model, IClientModel client);
|
||||
bool Update(CaseBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IClientLogic
|
||||
{
|
||||
List<ClientViewModel>? ReadList(ClientSearchModel? model);
|
||||
List<ClientViewModel>? ReadCaseElementList(CaseSearchModel? model);
|
||||
List<ClientViewModel>? ReadVisitElementList(VisitSearchModel? model);
|
||||
ClientViewModel? ReadElement(ClientSearchModel model);
|
||||
bool Create(ClientBindingModel model);
|
||||
bool Update(ClientBindingModel model);
|
||||
bool Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using LawFimDataModels.Models;
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IVisitLogic
|
||||
{
|
||||
List<VisitViewModel>? ReadList(VisitSearchModel? model);
|
||||
VisitViewModel? ReadElement(VisitSearchModel model);
|
||||
bool Create(VisitBindingModel model);
|
||||
bool Update(VisitBindingModel model);
|
||||
bool Delete(VisitBindingModel model);
|
||||
bool AddClientToVisit(VisitSearchModel model, IClientModel client);
|
||||
}
|
||||
}
|
13
LawFim/LawFirmContracts/LawFirmContracts.csproj
Normal file
13
LawFim/LawFirmContracts/LawFirmContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LawFimDataModels\LawFimDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
11
LawFim/LawFirmContracts/SearchModels/CaseSearchModel.cs
Normal file
11
LawFim/LawFirmContracts/SearchModels/CaseSearchModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace LawFirmContracts.SearchModels
|
||||
{
|
||||
public class CaseSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? CaseType { get; set; }
|
||||
public DateTime? DateFrom { get; set; }
|
||||
public DateTime? DateTo { get; set; }
|
||||
}
|
||||
}
|
10
LawFim/LawFirmContracts/SearchModels/ClientSearchModel.cs
Normal file
10
LawFim/LawFirmContracts/SearchModels/ClientSearchModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace LawFirmContracts.SearchModels
|
||||
{
|
||||
public class ClientSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? FIO { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
}
|
||||
}
|
9
LawFim/LawFirmContracts/SearchModels/VisitSearchModel.cs
Normal file
9
LawFim/LawFirmContracts/SearchModels/VisitSearchModel.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace LawFirmContracts.SearchModels
|
||||
{
|
||||
public class VisitSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? VisitDate { get; set; }
|
||||
public int? HearingId { get; set; }
|
||||
}
|
||||
}
|
16
LawFim/LawFirmContracts/StoragesContracts/ICaseStorage.cs
Normal file
16
LawFim/LawFirmContracts/StoragesContracts/ICaseStorage.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.StoragesContracts
|
||||
{
|
||||
public interface ICaseStorage
|
||||
{
|
||||
List<CaseViewModel> GetFullList();
|
||||
List<CaseViewModel> GetFilteredList(CaseSearchModel model);
|
||||
CaseViewModel? GetElement(CaseSearchModel model);
|
||||
CaseViewModel? Insert(CaseBindingModel model);
|
||||
CaseViewModel? Update(CaseBindingModel model);
|
||||
CaseViewModel? Delete(CaseBindingModel model);
|
||||
}
|
||||
}
|
18
LawFim/LawFirmContracts/StoragesContracts/IClientStorage.cs
Normal file
18
LawFim/LawFirmContracts/StoragesContracts/IClientStorage.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.StoragesContracts
|
||||
{
|
||||
public interface IClientStorage
|
||||
{
|
||||
List<ClientViewModel> GetFullList();
|
||||
List<ClientViewModel> GetFilteredList(ClientSearchModel model);
|
||||
List<ClientViewModel> GetClientCaseList(CaseSearchModel model);
|
||||
List<ClientViewModel> GetClientVisitList(VisitSearchModel model);
|
||||
ClientViewModel? GetElement(ClientSearchModel model);
|
||||
ClientViewModel? Insert(ClientBindingModel model);
|
||||
ClientViewModel? Update(ClientBindingModel model);
|
||||
ClientViewModel? Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
16
LawFim/LawFirmContracts/StoragesContracts/IVisitStorage.cs
Normal file
16
LawFim/LawFirmContracts/StoragesContracts/IVisitStorage.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
|
||||
namespace LawFirmContracts.StoragesContracts
|
||||
{
|
||||
public interface IVisitStorage
|
||||
{
|
||||
List<VisitViewModel> GetFullList();
|
||||
List<VisitViewModel> GetFilteredList(VisitSearchModel model);
|
||||
VisitViewModel? GetElement(VisitSearchModel model);
|
||||
VisitViewModel? Insert(VisitBindingModel model);
|
||||
VisitViewModel? Update(VisitBindingModel model);
|
||||
VisitViewModel? Delete(VisitBindingModel model);
|
||||
}
|
||||
}
|
22
LawFim/LawFirmContracts/ViewModels/CaseViewModel.cs
Normal file
22
LawFim/LawFirmContracts/ViewModels/CaseViewModel.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using LawFimDataModels.Enums;
|
||||
using LawFimDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawFirmContracts.ViewModels
|
||||
{
|
||||
public class CaseViewModel : ICaseModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[DisplayName("Статус")]
|
||||
public CaseStatus Status { get; set; } = CaseStatus.Неизвестен;
|
||||
[DisplayName("Вид производства")]
|
||||
public string CaseType { get; set; } = string.Empty;
|
||||
[DisplayName("Дата создания")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
[DisplayName("Дата выполнения")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
||||
}
|
||||
}
|
16
LawFim/LawFirmContracts/ViewModels/ClientViewModel.cs
Normal file
16
LawFim/LawFirmContracts/ViewModels/ClientViewModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using LawFimDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawFirmContracts.ViewModels
|
||||
{
|
||||
public class ClientViewModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("ФИО клиента")]
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
[DisplayName("Email клиента")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
[DisplayName("Телефон клиента")]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
14
LawFim/LawFirmContracts/ViewModels/VisitViewModel.cs
Normal file
14
LawFim/LawFirmContracts/ViewModels/VisitViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using LawFimDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawFirmContracts.ViewModels
|
||||
{
|
||||
public class VisitViewModel : IVisitModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Дата визита")]
|
||||
public DateTime VisitDate { get; set; }
|
||||
public int HearingId { get; set; }
|
||||
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user