Проект с моделями

This commit is contained in:
VictoriaPresnyakova 2023-02-05 18:01:09 +04:00
parent ec9e160673
commit e1c0c1942e
6 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,11 @@
namespace AbstractJewelryStoreModels.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 1,
Готов = 2,
Выдан = 3
}
}

View File

@ -0,0 +1,7 @@
namespace AbstractJewelryStoreModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractJewelryStoreModels.Models
{
internal class IComponentModel : IId
{
string ComponentName { get; }
double Cost { get; }
}
}

View File

@ -0,0 +1,20 @@
using AbstractJewelryStoreModels.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractJewelryStoreModels.Models
{
internal class IOrderModel : IId
{
int ProductId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }
DateTime DateCreate { get; }
DateTime? DateImplement { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractJewelryStoreModels.Models
{
internal class IProductModel : IId
{
string ProductName { get; }
double Price { get; }
Dictionary<int, (IComponentModel, int)> ProductComponents { get; }
}
}