merge
This commit is contained in:
commit
299cdace4a
43
FurnitureAssembly_Worker/FurnitureAssembly_Worker.sln
Normal file
43
FurnitureAssembly_Worker/FurnitureAssembly_Worker.sln
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.33516.290
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssembly_Worker", "FurnitureAssembly_Worker\FurnitureAssembly_Worker.csproj", "{71143C15-D5B7-4E84-8E41-4C6476363EDE}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssembly_WorkerDataModels", "FurnitureAssembly_WorkerDataModels\FurnitureAssembly_WorkerDataModels.csproj", "{2DA5196A-E6D9-496C-A373-FD18176DC908}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssembly_WorkerDatabaseImplement", "FurnitureAssembly_WorkerDatabaseImplement\FurnitureAssembly_WorkerDatabaseImplement.csproj", "{FE719511-094C-4CAB-A308-1AF7EF29ACFA}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssembly_WorkerContracts", "FurnitureAssembly_WorkerContracts\FurnitureAssembly_WorkerContracts.csproj", "{7DA16540-5534-4F8E-8C0E-8444811E4F9C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{71143C15-D5B7-4E84-8E41-4C6476363EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{71143C15-D5B7-4E84-8E41-4C6476363EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{71143C15-D5B7-4E84-8E41-4C6476363EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{71143C15-D5B7-4E84-8E41-4C6476363EDE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2DA5196A-E6D9-496C-A373-FD18176DC908}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2DA5196A-E6D9-496C-A373-FD18176DC908}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2DA5196A-E6D9-496C-A373-FD18176DC908}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2DA5196A-E6D9-496C-A373-FD18176DC908}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FE719511-094C-4CAB-A308-1AF7EF29ACFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FE719511-094C-4CAB-A308-1AF7EF29ACFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FE719511-094C-4CAB-A308-1AF7EF29ACFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FE719511-094C-4CAB-A308-1AF7EF29ACFA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7DA16540-5534-4F8E-8C0E-8444811E4F9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7DA16540-5534-4F8E-8C0E-8444811E4F9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7DA16540-5534-4F8E-8C0E-8444811E4F9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7DA16540-5534-4F8E-8C0E-8444811E4F9C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {F82F42E4-4E97-4C91-A78D-D9213CECC6B6}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace FurnitureAssembly_Worker
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,19 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class FurnitureBindingModel : IFurnitureModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||||
|
public Dictionary<int, (IMaterialModel, int)> FurnitureMaterials { get; set; } = new();
|
||||||
|
public IUserModel User { get; set; } = new UserBindingModel();
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class FurnitureModuleBindingModel : IFurnitureModuleModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
public Dictionary<int, (IFurnitureModel, int)> FurnitureFurnitureModules { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static System.Formats.Asn1.AsnWriter;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class MaterialBindingModel : IMaterialModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
public IScopeModel scope { get; set; } = new ScopeBindingModel();
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using FurnitureAssembly_WorkerDataModels.Enums;
|
||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class OrderBindingModel : IOrderModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string CustomerName { get; set; } = string.Empty;
|
||||||
|
public PaymentType PaymentType { get; set; } = PaymentType.Неизвестен;
|
||||||
|
public Dictionary<int, (ISetModel, int)> OrderSets { get; set; } = new();
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ReportBindingModel
|
||||||
|
{
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class RoleBindingModel : IRoleModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static System.Formats.Asn1.AsnWriter;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ScopeBindingModel : IScopeModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class SetBindingModel : ISetModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
public Dictionary<int, (IFurnitureModuleModel, int)> SetFurnitureModules { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class UserBindingModel : IUserModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Login { get; set; } = string.Empty;
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public IRoleModel Role { get; set; } = new RoleBindingModel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IFurnitureModuleLogic
|
||||||
|
{
|
||||||
|
List<FurnitureModuleViewModel>? ReadList(FurnitureModuleSearchModel? model);
|
||||||
|
FurnitureModuleViewModel? ReadElement(FurnitureModuleSearchModel model);
|
||||||
|
bool Create(FurnitureModuleBindingModel model);
|
||||||
|
bool Update(FurnitureModuleBindingModel model);
|
||||||
|
bool Delete(FurnitureModuleBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IOrderLogic
|
||||||
|
{
|
||||||
|
List<OrderViewModel>? ReadList(OrderSearchModel? model);
|
||||||
|
OrderViewModel? ReadElement(OrderSearchModel model);
|
||||||
|
bool Create(OrderBindingModel model);
|
||||||
|
bool Update(OrderBindingModel model);
|
||||||
|
bool Delete(OrderBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IReportLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка материалов с указанием, в каких мебельных модулей используются
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportSetMaterialViewModel> GetSetMaterial();
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка заказов за определенный период
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение материалов в файл-Word
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveMaterialToWordFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение материалов с указаеним мебельных модулей в файл-Excel
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveSetMaterialToExcelFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение заказов в файл-Pdf
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface ISetLogic
|
||||||
|
{
|
||||||
|
List<SetViewModel>? ReadList(SetSearchModel? model);
|
||||||
|
SetViewModel? ReadElement(SetSearchModel model);
|
||||||
|
bool Create(SetBindingModel model);
|
||||||
|
bool Update(SetBindingModel model);
|
||||||
|
bool Delete(SetBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IUserLogic
|
||||||
|
{
|
||||||
|
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||||
|
UserViewModel? ReadElement(UserSearchModel model);
|
||||||
|
bool Create(UserBindingModel model);
|
||||||
|
bool Update(UserBindingModel model);
|
||||||
|
bool Delete(UserBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\FurnitureAssembly_WorkerDataModels\FurnitureAssembly_WorkerDataModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class FurnitureModuleSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class FurnitureSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class MaterialSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class OrderSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class RoleSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ScopeSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class SetSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class UserSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Login { get; set; }
|
||||||
|
public string? Password { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IFurnitureModuleStorage
|
||||||
|
{
|
||||||
|
List<FurnitureModuleViewModel> GetFullList();
|
||||||
|
List<FurnitureModuleViewModel> GetFilteredList(FurnitureModuleSearchModel model);
|
||||||
|
FurnitureModuleViewModel? GetElement(FurnitureModuleSearchModel model);
|
||||||
|
FurnitureModuleViewModel? Insert(FurnitureModuleBindingModel model);
|
||||||
|
FurnitureModuleViewModel? Update(FurnitureModuleBindingModel model);
|
||||||
|
FurnitureModuleViewModel? Delete(FurnitureModuleBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IFurnitureStorage
|
||||||
|
{
|
||||||
|
List<FurnitureViewModel> GetFullList();
|
||||||
|
List<FurnitureViewModel> GetFilteredList(FurnitureSearchModel model);
|
||||||
|
FurnitureViewModel? GetElement(FurnitureSearchModel model);
|
||||||
|
FurnitureViewModel? Insert(FurnitureBindingModel model);
|
||||||
|
FurnitureViewModel? Update(FurnitureBindingModel model);
|
||||||
|
FurnitureViewModel? Delete(FurnitureBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IMaterialStorage
|
||||||
|
{
|
||||||
|
List<MaterialViewModel> GetFullList();
|
||||||
|
List<MaterialViewModel> GetFilteredList(MaterialSearchModel model);
|
||||||
|
MaterialViewModel? GetElement(MaterialSearchModel model);
|
||||||
|
MaterialViewModel? Insert(MaterialBindingModel model);
|
||||||
|
MaterialViewModel? Update(MaterialBindingModel model);
|
||||||
|
MaterialViewModel? Delete(MaterialBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IOrderStorage
|
||||||
|
{
|
||||||
|
List<OrderViewModel> GetFullList();
|
||||||
|
List<OrderViewModel> GetFilteredList(OrderSearchModel model);
|
||||||
|
OrderViewModel? GetElement(OrderSearchModel model);
|
||||||
|
OrderViewModel? Insert(OrderBindingModel model);
|
||||||
|
OrderViewModel? Update(OrderBindingModel model);
|
||||||
|
OrderViewModel? Delete(OrderBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IRoleStorage
|
||||||
|
{
|
||||||
|
List<RoleViewModel> GetFullList();
|
||||||
|
List<RoleViewModel> GetFilteredList(RoleSearchModel model);
|
||||||
|
RoleViewModel? GetElement(RoleSearchModel model);
|
||||||
|
RoleViewModel? Insert(RoleBindingModel model);
|
||||||
|
RoleViewModel? Update(RoleBindingModel model);
|
||||||
|
RoleViewModel? Delete(RoleBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IScopeStorage
|
||||||
|
{
|
||||||
|
List<ScopeViewModel> GetFullList();
|
||||||
|
List<ScopeViewModel> GetFilteredList(ScopeSearchModel model);
|
||||||
|
ScopeViewModel? GetElement(ScopeSearchModel model);
|
||||||
|
ScopeViewModel? Insert(ScopeBindingModel model);
|
||||||
|
ScopeViewModel? Update(ScopeBindingModel model);
|
||||||
|
ScopeViewModel? Delete(ScopeBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface ISetStorage
|
||||||
|
{
|
||||||
|
List<SetViewModel> GetFullList();
|
||||||
|
List<SetViewModel> GetFilteredList(SetSearchModel model);
|
||||||
|
SetViewModel? GetElement(SetSearchModel model);
|
||||||
|
SetViewModel? Insert(SetBindingModel model);
|
||||||
|
SetViewModel? Update(SetBindingModel model);
|
||||||
|
SetViewModel? Delete(SetBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureAssembly_WorkerContracts.BindingModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.SearchModels;
|
||||||
|
using FurnitureAssembly_WorkerContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class FurnitureModuleViewModel : IFurnitureModuleModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Название модуля")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Цена модуля")]
|
||||||
|
public double Cost { get; set; }
|
||||||
|
[DisplayName("Дата создания")]
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
[DisplayName("Изготовитель")]
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
public Dictionary<int, (IFurnitureModel, int)> FurnitureFurnitureModules { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class FurnitureViewModel : IFurnitureModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Название изделия")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Цена изделия")]
|
||||||
|
public double Cost { get; set; }
|
||||||
|
[DisplayName("Дата создания")]
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public Dictionary<int, (IMaterialModel, int)> FurnitureMaterials { get; set; } = new();
|
||||||
|
[DisplayName("Менеджер")]
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class MaterialViewModel : IMaterialModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
public IScopeModel scope { get; set; } = new ScopeViewModel();
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Enums;
|
||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class OrderViewModel : IOrderModel
|
||||||
|
{
|
||||||
|
[DisplayName("Номер")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Имя заказчика")]
|
||||||
|
public string CustomerName { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Тип оплаты")]
|
||||||
|
public PaymentType PaymentType { get; set; } = PaymentType.Неизвестен;
|
||||||
|
public Dictionary<int, (ISetModel, int)> OrderSets { get; set; } = new();
|
||||||
|
[DisplayName("Дата создания")]
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
[DisplayName("Менеджер")]
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportOrdersViewModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public string ManufactureName { get; set; } = string.Empty;
|
||||||
|
public double Sum { get; set; }
|
||||||
|
public string Status { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportSetMaterialViewModel
|
||||||
|
{
|
||||||
|
public string SetName { get; set; } = string.Empty;
|
||||||
|
public int TotalCount { get; set; }
|
||||||
|
public List<(string Material, int Count)> Materials { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class RoleViewModel : IRoleModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ScopeViewModel : IScopeModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class SetViewModel : ISetModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Название гарнитура")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Стоимость гарнитура")]
|
||||||
|
public double Cost { get; set; }
|
||||||
|
[DisplayName("Дата создания")]
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
[DisplayName("Менеджер")]
|
||||||
|
public IUserModel User { get; set; } = new UserViewModel();
|
||||||
|
public Dictionary<int, (IFurnitureModuleModel, int)> SetFurnitureModules { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class UserViewModel : IUserModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Пароль")]
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Логин (эл. почта)")]
|
||||||
|
public string Login { get; set; } = string.Empty;
|
||||||
|
[DisplayName("ФИО пользователя")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Роль пользоватеоя")]
|
||||||
|
public IRoleModel Role { get; set; } = new RoleViewModel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Enums
|
||||||
|
{
|
||||||
|
public enum PaymentType
|
||||||
|
{
|
||||||
|
Неизвестен = -1,
|
||||||
|
Наличными = 0,
|
||||||
|
Картой = 1,
|
||||||
|
Смешанный = 2
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels
|
||||||
|
{
|
||||||
|
public interface IId
|
||||||
|
{
|
||||||
|
int Id { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IFurnitureModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
double Cost { get; }
|
||||||
|
DateTime DateCreate { get; }
|
||||||
|
Dictionary<int, (IMaterialModel, int)> FurnitureMaterials { get; }
|
||||||
|
IUserModel User { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IFurnitureModuleModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
double Cost { get; }
|
||||||
|
DateTime DateCreate { get; }
|
||||||
|
IUserModel User { get; }
|
||||||
|
Dictionary<int, (IFurnitureModel, int)> FurnitureFurnitureModules { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static System.Formats.Asn1.AsnWriter;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IMaterialModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
double Cost { get; }
|
||||||
|
IScopeModel scope { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IOrderModel : IId
|
||||||
|
{
|
||||||
|
string CustomerName { get; }
|
||||||
|
PaymentType PaymentType { get; }
|
||||||
|
Dictionary<int, (ISetModel, int)> OrderSets { get; }
|
||||||
|
DateTime DateCreate { get; }
|
||||||
|
IUserModel User { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IRoleModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IScopeModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface ISetModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
double Cost { get; }
|
||||||
|
DateTime DateCreate { get; }
|
||||||
|
IUserModel User { get; }
|
||||||
|
Dictionary<int, (IFurnitureModuleModel, int)> SetFurnitureModules { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IUserModel : IId
|
||||||
|
{
|
||||||
|
string Login { get; }
|
||||||
|
string Password { get; }
|
||||||
|
string Name { get; }
|
||||||
|
IRoleModel Role { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDatabaseImplement
|
||||||
|
{
|
||||||
|
internal class FurnitureAssemblyDatabase : DbContext
|
||||||
|
{
|
||||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
|
{
|
||||||
|
if (optionsBuilder.IsConfigured == false)
|
||||||
|
{
|
||||||
|
optionsBuilder.UseNpgsql("Host=zyzf.space;Port=5434;Database=kursach;Username=postgres;Password=kursach");
|
||||||
|
}
|
||||||
|
base.OnConfiguring(optionsBuilder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.4" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.4" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.4">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\FurnitureAssembly_WorkerDataModels\FurnitureAssembly_WorkerDataModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,15 @@
|
|||||||
|
using FurnitureAssembly_WorkerDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureAssembly_WorkerDatabaseImplement.Models
|
||||||
|
{
|
||||||
|
public class Role : IRoleModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name => throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user