Compare commits

..

1 Commits

Author SHA1 Message Date
Илья Федотов
3b361e18fc Data models 0.1 2024-04-27 12:58:16 +04:00
12 changed files with 179 additions and 0 deletions

View File

@ -3,7 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronicsShopDataModels", "ElectronicsShopDataModels\ElectronicsShopDataModels.csproj", "{380E3833-D9AE-46C7-8881-9B15B8559411}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{380E3833-D9AE-46C7-8881-9B15B8559411}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{380E3833-D9AE-46C7-8881-9B15B8559411}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380E3833-D9AE-46C7-8881-9B15B8559411}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380E3833-D9AE-46C7-8881-9B15B8559411}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection

View File

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

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 1,
Готов = 2,
Выдан = 3
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Enums
{
public enum PaymeantOption
{
Неизвестно = -1,
Полная_оплата = 0,
Частичная_оплата = 1
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels
{
public interface IID
{
int ID { get; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels
{
public interface IUser : IID
{
string FirstName { get; }
string LastName { get; }
string Login { get; }
string Email { get; }
string Password { get; }
string PhoneNumber { get; }
int RoleID { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface ICategoryProductModel : IID
{
string Name { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface IClientModel : IUser
{
int UserID { get; }
}
}

View File

@ -0,0 +1,20 @@
using ElectronicsShopDataModels.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface IOrderModel : IID
{
double Sum { get; }
OrderStatus Status { get; }
PaymeantOption PaymeantOption { get; }
DateTime DateCreate { get; }
DateTime? DateImplemet { get; }
//список товаров в заказе
Dictionary<int, (IProductModel, int)> ProductList { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface IProductModel : IID
{
string ProductName { get; }
double Price { get; }
int Count { get; }
int CategoryID { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface IRoleModel : IID
{
string Name { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models
{
public interface IShopAssistentModel : IUser
{
int UserID { get; }
}
}