Реализация моделей данных

This commit is contained in:
dasha 2023-04-01 15:44:23 +04:00
parent a7cebe62b7
commit 6b618795f9
5 changed files with 30 additions and 15 deletions

View File

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

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HardwareShopDataModels.Enums
namespace HardwareShopDataModels.Enums
{
public enum UserRole
{

View File

@ -2,5 +2,8 @@
{
public interface IComponentModel : IId
{
string ComponentName { get; }
double Cost { get; }
int UserId { get; }
}
}

View File

@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
namespace HardwareShopDataModels.Models
{
public interface IGoodModel : IId
{
string GoodName { get; }
double Price { get; }
int UserId { get; }
Dictionary<int, (IComponentModel, int)> GoodComponents { get; }
}
}

View File

@ -1,6 +1,15 @@
namespace HardwareShopDataModels.Models
using HardwareShopDataModels.Enums;
namespace HardwareShopDataModels.Models
{
public interface IOrderModel : IId
{
int GoodId { get; }
int UserId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }
DateTime DateCreate { get; }
DateTime? DateImplement { get; }
}
}