Классы для BindingModels
This commit is contained in:
parent
9874fca4e0
commit
3263e19af1
@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.33424.131
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Confectionery", "Confectionery\Confectionery.csproj", "{3FBA3531-D080-42B2-869B-AF42CCF9C770}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Confectionery", "Confectionery\Confectionery.csproj", "{3FBA3531-D080-42B2-869B-AF42CCF9C770}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfectioneryDataModels", "ConfectioneryDataModels\ConfectioneryDataModels.csproj", "{B1066AB3-A781-49D8-9629-DAEEB7AEB926}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConfectioneryDataModels", "ConfectioneryDataModels\ConfectioneryDataModels.csproj", "{B1066AB3-A781-49D8-9629-DAEEB7AEB926}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfectioneryContracts", "ConfectioneryContracts\ConfectioneryContracts.csproj", "{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -21,6 +23,10 @@ Global
|
||||
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -0,0 +1,16 @@
|
||||
using ConfectioneryDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConfectioneryContracts.BindingModels
|
||||
{
|
||||
public class ComponentBindingModel : IComponentModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ComponentName { get; set; } = string.Empty;
|
||||
public double Cost { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using ConfectioneryDataModels.Enums;
|
||||
using ConfectioneryDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConfectioneryContracts.BindingModels
|
||||
{
|
||||
public class OrderBindingModel : IOrderModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PastryId { get; set; }
|
||||
public int Count { get; set; }
|
||||
public double Sum { get; set; }
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
public DateTime? DateImplement { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using ConfectioneryDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConfectioneryContracts.BindingModels
|
||||
{
|
||||
public class PastryBindingModel : IPastryModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string PastryName { get; set; } = string.Empty;
|
||||
public double Price { get; set; }
|
||||
public Dictionary<int, (IComponentModel, int)> PastryComponents { get; set; } = new();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace ConfectioneryDataModels
|
||||
namespace ConfectioneryContracts
|
||||
{
|
||||
public class Class1
|
||||
{
|
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ConfectioneryDataModels\ConfectioneryDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="BusinessLogicsContracts\" />
|
||||
<Folder Include="SearchModels\" />
|
||||
<Folder Include="StoragesContracts\" />
|
||||
<Folder Include="ViewModels\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -9,7 +9,7 @@ namespace ConfectioneryDataModels.Models
|
||||
{
|
||||
public interface IOrderModel : IId
|
||||
{
|
||||
int ProductId { get; }
|
||||
int PastryId { get; }
|
||||
int Count { get; }
|
||||
double Sum { get; }
|
||||
OrderStatus Status { get; }
|
||||
|
@ -6,10 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ConfectioneryDataModels.Models
|
||||
{
|
||||
internal interface IPastryModel : IId
|
||||
public interface IPastryModel : IId
|
||||
{
|
||||
string PastryName { get; }
|
||||
double Price { get; }
|
||||
Dictionary<int, (IComponentModel, int)> ProductComponents { get; }
|
||||
Dictionary<int, (IComponentModel, int)> PastryComponents { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user