Merge branch 'Stage1' of https://git.is.ulstu.ru/sofiaivv/PIbd23_Ivanova_Yakobchuk_CourseWork_LawCompany into Stage1
This commit is contained in:
commit
1c2f7d5faf
11
LawCompany/LawCompany/Models/IConsultantModel.cs
Normal file
11
LawCompany/LawCompany/Models/IConsultantModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace LawCompanyDataModels.Models
|
||||
{
|
||||
public interface IConsultationModel : IId
|
||||
{
|
||||
Dictionary<int, ILawyerModel> ConsultationLawyers { get; }
|
||||
double Cost { get; }
|
||||
DateTime ConsultationDate { get; }
|
||||
public int CaseId { get; }
|
||||
public int GuarantorId { get; }
|
||||
}
|
||||
}
|
9
LawCompany/LawCompany/Models/IGuarantorModel.cs
Normal file
9
LawCompany/LawCompany/Models/IGuarantorModel.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace LawCompanyDataModels.Models
|
||||
{
|
||||
public interface IGuarantorModel : IId
|
||||
{
|
||||
string FIO { get; }
|
||||
string Email { get; }
|
||||
string Password { get; }
|
||||
}
|
||||
}
|
10
LawCompany/LawCompany/Models/IHearingModel.cs
Normal file
10
LawCompany/LawCompany/Models/IHearingModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace LawCompanyDataModels.Models
|
||||
{
|
||||
public interface IHearingModel : IId
|
||||
{
|
||||
Dictionary<int, ILawyerModel> HearingLawyers { get; }
|
||||
DateTime HearingDate { get; }
|
||||
string Judge { get; }
|
||||
public int GuarantorId { get; }
|
||||
}
|
||||
}
|
16
LawCompany/LawCompany/Models/ILawyerModel.cs
Normal file
16
LawCompany/LawCompany/Models/ILawyerModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyDataModels.Models
|
||||
{
|
||||
public interface ILawyerModel : IId
|
||||
{
|
||||
string FIO { get; }
|
||||
string Phone { get; }
|
||||
string Email { get; }
|
||||
public int GuarantorId { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class ConsultationBindingModel : IConsultationModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Cost { get; set; }
|
||||
public DateTime ConsultationDate { get; set; }
|
||||
public int CaseId { get; set; }
|
||||
public int GuarantorId { get; set; }
|
||||
public Dictionary<int, ILawyerModel> ConsultationLawyers { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class GuarantorBindingModel : IGuarantorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class HearingBindingModel : IHearingModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime HearingDate { get; set; }
|
||||
public string Judge { get; set; } = string.Empty;
|
||||
public int GuarantorId { get; set; }
|
||||
public Dictionary<int, ILawyerModel> HearingLawyers { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class LawyerBindingModel : ILawyerModel
|
||||
{
|
||||
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;
|
||||
public int GuarantorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IConsultationLogic
|
||||
{
|
||||
List<ConsultationViewModel>? ReadList(ConsultationSearchModel? model);
|
||||
ConsultationViewModel? ReadElement(ConsultationSearchModel model);
|
||||
bool Create(ConsultationBindingModel model);
|
||||
bool Update(ConsultationBindingModel model);
|
||||
bool Delete(ConsultationBindingModel model);
|
||||
bool AddLawyerToConsultation(ConsultationSearchModel model, ILawyerModel lawyer);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IGuarantorLogic
|
||||
{
|
||||
List<GuarantorViewModel>? ReadList(GuarantorSearchModel? model);
|
||||
GuarantorViewModel? ReadElement(GuarantorSearchModel model);
|
||||
bool Create(GuarantorBindingModel model);
|
||||
bool Update(GuarantorBindingModel model);
|
||||
bool Delete(GuarantorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IHearingLogic
|
||||
{
|
||||
List<HearingViewModel>? ReadList(HearingSearchModel? model);
|
||||
HearingViewModel? ReadElement(HearingSearchModel model);
|
||||
bool Create(HearingBindingModel model);
|
||||
bool Update(HearingBindingModel model);
|
||||
bool Delete(HearingBindingModel model);
|
||||
bool AddLawyerToHearing(HearingSearchModel model, ILawyerModel client);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface ILawyerLogic
|
||||
{
|
||||
List<LawyerViewModel>? ReadHearingElementList(HearingSearchModel? model);
|
||||
List<LawyerViewModel>? ReadConsultationElementList(ConsultationSearchModel? model);
|
||||
List<LawyerViewModel>? ReadList(LawyerSearchModel? model);
|
||||
LawyerViewModel? ReadElement(LawyerSearchModel model);
|
||||
bool Create(LawyerBindingModel model);
|
||||
bool Update(LawyerBindingModel model);
|
||||
bool Delete(LawyerBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class ConsultationSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public double? Cost { get; set; }
|
||||
public DateTime? ConsultationDate { get; set; }
|
||||
public int? CaseId { get; set; }
|
||||
public int? GuarantorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class GuarantorSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? FIO { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class HearingSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? HearingDate { get; set; }
|
||||
public DateTime? DateFrom { get; set; }
|
||||
public DateTime? DateTo { get; set; }
|
||||
public int? GuarantorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class LawyerSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? FIO { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public int? GuarantorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public interface IConsultationStorage
|
||||
{
|
||||
List<ConsultationViewModel> GetFullList();
|
||||
List<ConsultationViewModel> GetFilteredList(ConsultationSearchModel model);
|
||||
ConsultationViewModel? GetElement(ConsultationSearchModel model);
|
||||
ConsultationViewModel? Insert(ConsultationBindingModel model);
|
||||
ConsultationViewModel? Update(ConsultationBindingModel model);
|
||||
ConsultationViewModel? Delete(ConsultationBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public interface IGuarantorStorage
|
||||
{
|
||||
List<GuarantorViewModel> GetFullList();
|
||||
List<GuarantorViewModel> GetFilteredList(GuarantorSearchModel model);
|
||||
GuarantorViewModel? GetElement(GuarantorSearchModel model);
|
||||
GuarantorViewModel? Insert(GuarantorBindingModel model);
|
||||
GuarantorViewModel? Update(GuarantorBindingModel model);
|
||||
GuarantorViewModel? Delete(GuarantorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public class IHearingStorage
|
||||
{
|
||||
List<HearingViewModel> GetFullList();
|
||||
List<HearingViewModel> GetFilteredList(HearingSearchModel model);
|
||||
HearingViewModel? GetElement(HearingSearchModel model);
|
||||
HearingViewModel? Insert(HearingBindingModel model);
|
||||
HearingViewModel? Update(HearingBindingModel model);
|
||||
HearingViewModel? Delete(HearingBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public class ILawyerStorage
|
||||
{
|
||||
List<LawyerViewModel> GetFullList();
|
||||
List<LawyerViewModel> GetFilteredList(LawyerSearchModel model);
|
||||
List<LawyerViewModel> GetLawyerConsultationList(ConsultationSearchModel model);
|
||||
List<LawyerViewModel> GetLawyerHearingList(HearingSearchModel model);
|
||||
LawyerViewModel? GetElement(LawyerSearchModel model);
|
||||
LawyerViewModel? Insert(LawyerBindingModel model);
|
||||
LawyerViewModel? Update(LawyerBindingModel model);
|
||||
LawyerViewModel? Delete(LawyerBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class ConsultationViewModel : IConsultationModel
|
||||
{
|
||||
[DisplayName("Номер консультации")]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Цена консультации")]
|
||||
public double Cost { get; set; }
|
||||
[DisplayName("Дело")]
|
||||
public string CaseName { get; set; } = string.Empty;
|
||||
public int CaseId { get; set; }
|
||||
[DisplayName("Имя поручителя")]
|
||||
public string GuarantorName { get; set; } = string.Empty;
|
||||
public int GuarantorId { get; set; }
|
||||
public Dictionary<int, ILawyerModel> ConsultationLawyers { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class GuarantorViewModel : IGuarantorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Имя поручителя")]
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
[DisplayName("E-mail поручителя")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
[DisplayName("Пароль поручителя")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class HearingViewModel : IHearingModel
|
||||
{
|
||||
[DisplayName("Номер слушания")]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Дата слушания")]
|
||||
public DateTime HearingDate { get; set; }
|
||||
[DisplayName("Суд")]
|
||||
public string Judge { get; set; } = string.Empty;
|
||||
[DisplayName("Имя поручителя")]
|
||||
public string GuarantorName { get; set; } = string.Empty;
|
||||
public int GuarantorId { get; set; }
|
||||
public Dictionary<int, ILawyerModel> HearingLawyers { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class LawyerViewModel : ILawyerModel
|
||||
{
|
||||
[DisplayName("Номер юриста")]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Имя юриста")]
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
[DisplayName("Телефон юриста")]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
[DisplayName("E-mail юриста")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public int GuarantorId { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user