From 8761d86e50bc16830db381b340dee9e6e1ce5a64 Mon Sep 17 00:00:00 2001 From: abazov73 <92822431+abazov73@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:36:35 +0400 Subject: [PATCH] Created project with models for construction company --- ConstructionCompany/ConstructionCompany.sln | 6 ++++++ .../ConstructionCompanyDataModels.csproj | 9 +++++++++ .../Enums/OrderStatus.cs | 16 +++++++++++++++ .../ConstructionCompanyDataModels/IId.cs | 13 ++++++++++++ .../Models/IEmployeeModel.cs | 14 +++++++++++++ .../Models/IMaterialModel.cs | 14 +++++++++++++ .../Models/IOrderModel.cs | 20 +++++++++++++++++++ .../Models/IPositionModel.cs | 14 +++++++++++++ 8 files changed, 106 insertions(+) create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/ConstructionCompanyDataModels.csproj create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/Enums/OrderStatus.cs create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/IId.cs create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/Models/IEmployeeModel.cs create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/Models/IMaterialModel.cs create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/Models/IOrderModel.cs create mode 100644 ConstructionCompany/ConstructionCompanyDataModels/Models/IPositionModel.cs diff --git a/ConstructionCompany/ConstructionCompany.sln b/ConstructionCompany/ConstructionCompany.sln index 6315ff7..6590f9e 100644 --- a/ConstructionCompany/ConstructionCompany.sln +++ b/ConstructionCompany/ConstructionCompany.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConstructionCompanyView", "ConstructionCompanyView\ConstructionCompanyView.csproj", "{E6C11D11-F20B-4A39-8FDA-82C75463ACBE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConstructionCompanyDataModels", "ConstructionCompanyDataModels\ConstructionCompanyDataModels.csproj", "{78CB5CC6-B587-41DD-B595-13138E6351C8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {E6C11D11-F20B-4A39-8FDA-82C75463ACBE}.Debug|Any CPU.Build.0 = Debug|Any CPU {E6C11D11-F20B-4A39-8FDA-82C75463ACBE}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6C11D11-F20B-4A39-8FDA-82C75463ACBE}.Release|Any CPU.Build.0 = Release|Any CPU + {78CB5CC6-B587-41DD-B595-13138E6351C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78CB5CC6-B587-41DD-B595-13138E6351C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78CB5CC6-B587-41DD-B595-13138E6351C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78CB5CC6-B587-41DD-B595-13138E6351C8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ConstructionCompany/ConstructionCompanyDataModels/ConstructionCompanyDataModels.csproj b/ConstructionCompany/ConstructionCompanyDataModels/ConstructionCompanyDataModels.csproj new file mode 100644 index 0000000..27ac386 --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/ConstructionCompanyDataModels.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/ConstructionCompany/ConstructionCompanyDataModels/Enums/OrderStatus.cs b/ConstructionCompany/ConstructionCompanyDataModels/Enums/OrderStatus.cs new file mode 100644 index 0000000..805925a --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/Enums/OrderStatus.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels.Enums +{ + public enum OrderStatus + { + Неизвестен = -1, + Принят = 0, + Выполняется = 1, + Завершён = 2 + } +} diff --git a/ConstructionCompany/ConstructionCompanyDataModels/IId.cs b/ConstructionCompany/ConstructionCompanyDataModels/IId.cs new file mode 100644 index 0000000..a33e40b --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/IId.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels +{ + public interface IId + { + int Id { get; } + } +} diff --git a/ConstructionCompany/ConstructionCompanyDataModels/Models/IEmployeeModel.cs b/ConstructionCompany/ConstructionCompanyDataModels/Models/IEmployeeModel.cs new file mode 100644 index 0000000..9c5ff2b --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/Models/IEmployeeModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels.Models +{ + public interface IEmployeeModel : IId + { + string Name { get; } + int PositionID { get; } + } +} diff --git a/ConstructionCompany/ConstructionCompanyDataModels/Models/IMaterialModel.cs b/ConstructionCompany/ConstructionCompanyDataModels/Models/IMaterialModel.cs new file mode 100644 index 0000000..fc2fab0 --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/Models/IMaterialModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels.Models +{ + public interface IMaterialModel : IId + { + string Name { get; } + int Quantity { get; } + } +} diff --git a/ConstructionCompany/ConstructionCompanyDataModels/Models/IOrderModel.cs b/ConstructionCompany/ConstructionCompanyDataModels/Models/IOrderModel.cs new file mode 100644 index 0000000..fe6d1b9 --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/Models/IOrderModel.cs @@ -0,0 +1,20 @@ +using ConstructionCompanyDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels.Models +{ + public interface IOrderModel : IId + { + string Description { get; } + string Adress { get; } + double Price { get; } + OrderStatus Status { get; } + string CustomerNumber { get; } + DateOnly DateBegin { get; } + DateOnly? DateEnd { get; } + } +} diff --git a/ConstructionCompany/ConstructionCompanyDataModels/Models/IPositionModel.cs b/ConstructionCompany/ConstructionCompanyDataModels/Models/IPositionModel.cs new file mode 100644 index 0000000..8b565cd --- /dev/null +++ b/ConstructionCompany/ConstructionCompanyDataModels/Models/IPositionModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConstructionCompanyDataModels.Models +{ + public interface IPositionModel : IId + { + string Name { get; } + double Salary { get; } + } +}