diff --git a/ServiceStation/ServiceStationContracts/BindingModels/GuarantorBindingModel.cs b/ServiceStation/ServiceStationContracts/BindingModels/GuarantorBindingModel.cs new file mode 100644 index 0000000..2e39ea9 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BindingModels/GuarantorBindingModel.cs @@ -0,0 +1,22 @@ +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BindingModels +{ + public class GuarantorBindingModel : IGuarantorModel + { + public int Id { get; set; } + + public string GuarantorFIO { get; set; } = string.Empty; + + public string GuarantorEmail { get; set; } = string.Empty; + + public string GuarantorPassword { get; set; } = string.Empty; + + public string GuarantorNumber { get; set; } = string.Empty; + } +} diff --git a/ServiceStation/ServiceStationContracts/BindingModels/RepairBindingModel.cs b/ServiceStation/ServiceStationContracts/BindingModels/RepairBindingModel.cs new file mode 100644 index 0000000..6230953 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BindingModels/RepairBindingModel.cs @@ -0,0 +1,27 @@ +using ServiceStationDataModels.Enums; +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BindingModels +{ + public class RepairBindingModel : IRepairModel + { + public int Id { get; set; } + + public string RepairName { get; set; } = string.Empty; + + public RepairStatus Status { get; set; } = RepairStatus.Неизвестен; + + public double RepairPrice { get; set; } + + public int GuarantorId { get; set; } + + public int DefectId { get; set; } + + public Dictionary RepairSpareParts { get; set; } = new(); + } +} diff --git a/ServiceStation/ServiceStationContracts/BindingModels/SparePartBindingModel.cs b/ServiceStation/ServiceStationContracts/BindingModels/SparePartBindingModel.cs new file mode 100644 index 0000000..27d92ad --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BindingModels/SparePartBindingModel.cs @@ -0,0 +1,20 @@ +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BindingModels +{ + public class SparePartBindingModel : ISparePartModel + { + public int Id { get; set; } + + public string SparePartName { get; set; } = string.Empty; + + public double SparePartPrice { get; set; } + + public int GuarantorId { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/BindingModels/WorkBindingModel.cs b/ServiceStation/ServiceStationContracts/BindingModels/WorkBindingModel.cs new file mode 100644 index 0000000..e5c24bc --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BindingModels/WorkBindingModel.cs @@ -0,0 +1,27 @@ +using ServiceStationDataModels.Enums; +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BindingModels +{ + public class WorkBindingModel : IWorkModel + { + public int Id { get; set; } + + public string WorkName { get; set; } = string.Empty; + + public WorkStatus Status { get; set; } = WorkStatus.Неизвестен; + + public double WorkPrice { get; set; } + + public int GuarantorId { get; set; } + + public int TechnicalWorkId { get; set; } + + public Dictionary WorkSpareParts { get; set; } = new(); + } +} diff --git a/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IGuarantorLogic.cs b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IGuarantorLogic.cs new file mode 100644 index 0000000..4083317 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IGuarantorLogic.cs @@ -0,0 +1,21 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BusinessLogicsContracts +{ + public interface IGuarantorLogic + { + List? ReadList(GuarantorSearchModel? model); + GuarantorViewModel? ReadElement(GuarantorSearchModel? model); + + bool Create(GuarantorBindingModel model); + bool Update(GuarantorBindingModel model); + bool Delete(GuarantorBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IRepairLogic.cs b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IRepairLogic.cs new file mode 100644 index 0000000..ff736d1 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IRepairLogic.cs @@ -0,0 +1,21 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BusinessLogicsContracts +{ + public interface IRepairLogic + { + List? ReadList(RepairSearchModel? model); + RepairViewModel? ReadElement(RepairSearchModel? model); + + bool Create(RepairBindingModel model); + bool Update(RepairBindingModel model); + bool Delete(RepairBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/ISparePartLogic.cs b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/ISparePartLogic.cs new file mode 100644 index 0000000..e8a5cc4 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/ISparePartLogic.cs @@ -0,0 +1,21 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BusinessLogicsContracts +{ + public interface ISparePartLogic + { + List? ReadList(SparePartSearchModel? model); + SparePartViewModel? ReadElement(SparePartSearchModel? model); + + bool Create(SparePartBindingModel model); + bool Update(SparePartBindingModel model); + bool Delete(SparePartBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IWorkLogic.cs b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IWorkLogic.cs new file mode 100644 index 0000000..b5e6939 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/BusinessLogicsContracts/IWorkLogic.cs @@ -0,0 +1,21 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.BusinessLogicsContracts +{ + public interface IWorkLogic + { + List? ReadList(WorkSearchModel? model); + WorkViewModel? ReadElement(WorkSearchModel? model); + + bool Create(WorkBindingModel model); + bool Update(WorkBindingModel model); + bool Delete(WorkBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/SearchModels/GuarantorSearchModel.cs b/ServiceStation/ServiceStationContracts/SearchModels/GuarantorSearchModel.cs new file mode 100644 index 0000000..e923c5b --- /dev/null +++ b/ServiceStation/ServiceStationContracts/SearchModels/GuarantorSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.SearchModels +{ + public class GuarantorSearchModel + { + public int? Id { get; set; } + public string? GuarantorFIO { get; set; } + public string? GuarantorEmail { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/SearchModels/RepairSearchModel.cs b/ServiceStation/ServiceStationContracts/SearchModels/RepairSearchModel.cs new file mode 100644 index 0000000..9d38635 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/SearchModels/RepairSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.SearchModels +{ + public class RepairSearchModel + { + public int? Id { get; set; } + public string? RepairName { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/SearchModels/SparePartSearchModel.cs b/ServiceStation/ServiceStationContracts/SearchModels/SparePartSearchModel.cs new file mode 100644 index 0000000..a22b0c4 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/SearchModels/SparePartSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.SearchModels +{ + public class SparePartSearchModel + { + public int? Id { get; set; } + public string? SparePartName { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/SearchModels/WorkSearchModel.cs b/ServiceStation/ServiceStationContracts/SearchModels/WorkSearchModel.cs new file mode 100644 index 0000000..b342cdd --- /dev/null +++ b/ServiceStation/ServiceStationContracts/SearchModels/WorkSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.SearchModels +{ + public class WorkSearchModel + { + public int? Id { get; set; } + public string? WorkName { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/StoragesContracts/IGuarantorStorage.cs b/ServiceStation/ServiceStationContracts/StoragesContracts/IGuarantorStorage.cs new file mode 100644 index 0000000..0d3bdd0 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/StoragesContracts/IGuarantorStorage.cs @@ -0,0 +1,22 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.StoragesContracts +{ + public interface IGuarantorStorage + { + List GetFullList(); + List GetFilteredList(GuarantorSearchModel model); + + GuarantorViewModel? GetElement(GuarantorSearchModel model); + GuarantorViewModel? Insert(GuarantorBindingModel model); + GuarantorViewModel? Update(GuarantorBindingModel model); + GuarantorViewModel? Delete(GuarantorBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/StoragesContracts/IRepairStorage.cs b/ServiceStation/ServiceStationContracts/StoragesContracts/IRepairStorage.cs new file mode 100644 index 0000000..f73c6e8 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/StoragesContracts/IRepairStorage.cs @@ -0,0 +1,22 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.StoragesContracts +{ + public interface IRepairStorage + { + List GetFullList(); + List GetFilteredList(RepairSearchModel model); + + RepairViewModel? GetElement(RepairSearchModel model); + RepairViewModel? Insert(RepairBindingModel model); + RepairViewModel? Update(RepairBindingModel model); + RepairViewModel? Delete(RepairBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/StoragesContracts/ISparePartStorage.cs b/ServiceStation/ServiceStationContracts/StoragesContracts/ISparePartStorage.cs new file mode 100644 index 0000000..362ae54 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/StoragesContracts/ISparePartStorage.cs @@ -0,0 +1,22 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.StoragesContracts +{ + public interface ISparePartStorage + { + List GetFullList(); + List GetFilteredList(SparePartSearchModel model); + + SparePartViewModel? GetElement(SparePartSearchModel model); + SparePartViewModel? Insert(SparePartBindingModel model); + SparePartViewModel? Update(SparePartBindingModel model); + SparePartViewModel? Delete(SparePartBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/StoragesContracts/IWorkStorage.cs b/ServiceStation/ServiceStationContracts/StoragesContracts/IWorkStorage.cs new file mode 100644 index 0000000..659ac71 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/StoragesContracts/IWorkStorage.cs @@ -0,0 +1,22 @@ +using ServiceStationContracts.BindingModels; +using ServiceStationContracts.SearchModels; +using ServiceStationContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.StoragesContracts +{ + public interface IWorkStorage + { + List GetFullList(); + List GetFilteredList(WorkSearchModel model); + + WorkViewModel? GetElement(WorkSearchModel model); + WorkViewModel? Insert(WorkBindingModel model); + WorkViewModel? Update(WorkBindingModel model); + WorkViewModel? Delete(WorkBindingModel model); + } +} diff --git a/ServiceStation/ServiceStationContracts/ViewModels/GuarantorViewModel.cs b/ServiceStation/ServiceStationContracts/ViewModels/GuarantorViewModel.cs new file mode 100644 index 0000000..83a01ef --- /dev/null +++ b/ServiceStation/ServiceStationContracts/ViewModels/GuarantorViewModel.cs @@ -0,0 +1,27 @@ +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.ViewModels +{ + public class GuarantorViewModel : IGuarantorModel + { + public int Id { get; set; } + + [DisplayName("ФИО поручителя")] + public string GuarantorFIO { get; set; } = string.Empty; + + [DisplayName("Почта поручителя(логин)")] + public string GuarantorEmail { get; set; } = string.Empty; + + [DisplayName("Пароль поручителя")] + public string GuarantorPassword { get; set; } = string.Empty; + + [DisplayName("Номер телефона поручителя")] + public string GuarantorNumber { get; set; } = string.Empty; + } +} diff --git a/ServiceStation/ServiceStationContracts/ViewModels/RepairViewModel.cs b/ServiceStation/ServiceStationContracts/ViewModels/RepairViewModel.cs new file mode 100644 index 0000000..c802eb3 --- /dev/null +++ b/ServiceStation/ServiceStationContracts/ViewModels/RepairViewModel.cs @@ -0,0 +1,31 @@ +using ServiceStationDataModels.Enums; +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.ViewModels +{ + public class RepairViewModel : IRepairModel + { + public int Id { get; set; } + + [DisplayName("Наименование ремонта")] + public string RepairName { get; set; } = string.Empty; + + [DisplayName("Статус ремонта")] + public RepairStatus Status { get; set; } + + [DisplayName("Стоимость ремонта")] + public double RepairPrice { get; set; } + + public int GuarantorId { get; } + + public int DefectId { get; } + + public Dictionary RepairSpareParts { get; set; } = new(); + } +} diff --git a/ServiceStation/ServiceStationContracts/ViewModels/SparePartViewModel.cs b/ServiceStation/ServiceStationContracts/ViewModels/SparePartViewModel.cs new file mode 100644 index 0000000..a2c5ffa --- /dev/null +++ b/ServiceStation/ServiceStationContracts/ViewModels/SparePartViewModel.cs @@ -0,0 +1,23 @@ +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.ViewModels +{ + public class SparePartViewModel : ISparePartModel + { + public int Id { get; set; } + + [DisplayName("Наименование запчасти")] + public string SparePartName { get; set; } = string.Empty; + + [DisplayName("Стоимость запчасти")] + public double SparePartPrice { get; set; } + + public int GuarantorId { get; set; } + } +} diff --git a/ServiceStation/ServiceStationContracts/ViewModels/WorkViewModel.cs b/ServiceStation/ServiceStationContracts/ViewModels/WorkViewModel.cs new file mode 100644 index 0000000..d3b156e --- /dev/null +++ b/ServiceStation/ServiceStationContracts/ViewModels/WorkViewModel.cs @@ -0,0 +1,31 @@ +using ServiceStationDataModels.Enums; +using ServiceStationDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ServiceStationContracts.ViewModels +{ + public class WorkViewModel : IWorkModel + { + public int Id { get; set; } + + [DisplayName("наименование работы")] + public string WorkName { get; set; } = string.Empty; + + [DisplayName("Статус работы")] + public WorkStatus Status { get; set; } + + [DisplayName("Стоимость работы")] + public double WorkPrice { get; set; } + + public int GuarantorId { get; } + + public int TechnicalWorkId { get; } + + public Dictionary WorkSpareParts { get; } = new(); + } +} diff --git a/ServiceStation/ServiceStationDataModels/Models/IRepairModel.cs b/ServiceStation/ServiceStationDataModels/Models/IRepairModel.cs index 812ad49..a1f34ee 100644 --- a/ServiceStation/ServiceStationDataModels/Models/IRepairModel.cs +++ b/ServiceStation/ServiceStationDataModels/Models/IRepairModel.cs @@ -12,7 +12,7 @@ namespace ServiceStationDataModels.Models Enums.RepairStatus Status { get; } - double RepairCost { get; } + double RepairPrice { get; } int GuarantorId { get; }