Завершено создание Binding моделей

This commit is contained in:
Сергей Полевой 2023-01-29 18:15:14 +04:00
parent 5bf198916e
commit f5db27a124
5 changed files with 65 additions and 0 deletions

View File

@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShop", "FlowerShop\Fl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShopDataModels", "FlowerShopDataModels\FlowerShopDataModels.csproj", "{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShopContracts", "FlowerShopContracts\FlowerShopContracts.csproj", "{404B251B-7B48-4648-99B4-7E99EDB05A6C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +23,10 @@ Global
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Release|Any CPU.Build.0 = Release|Any CPU
{404B251B-7B48-4648-99B4-7E99EDB05A6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{404B251B-7B48-4648-99B4-7E99EDB05A6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{404B251B-7B48-4648-99B4-7E99EDB05A6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{404B251B-7B48-4648-99B4-7E99EDB05A6C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,11 @@
using FlowerShopDataModels.Models;
namespace FlowerShopContracts.BindingModels
{
public class ComponentBindingModel : IComponentModel
{
public int Id { get; set; }
public string ComponentName { get; set; } = string.Empty;
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using FlowerShopDataModels.Enums;
using FlowerShopDataModels.Models;
namespace FlowerShopContracts.BindingModels
{
public class OrderBindingModel : IOrderModel
{
public int Id { get; set; }
public int ProductId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Unknown;
public DateTime DateCreate { get; set; } = DateTime.Now;
public DateTime? DateImplement { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using FlowerShopDataModels.Models;
namespace FlowerShopContracts.BindingModels
{
public class ProductBindingModel : IProductModel
{
public int Id { get; set; }
public string ProductName { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ProductComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FlowerShopDataModels\FlowerShopDataModels.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts\" />
<Folder Include="SearchModels\" />
<Folder Include="StoragesContracts\" />
<Folder Include="ViewModels\" />
</ItemGroup>
</Project>