Добавленны ViewModel реализованны только некоторые

This commit is contained in:
Николай 2023-04-01 12:26:05 +04:00
parent 995cc92189
commit 4d4b783b27
13 changed files with 131 additions and 4 deletions

View File

@ -6,4 +6,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\HardwareShopDataModels\HardwareShopDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
using FoodOrdersDataModels.Models;
using HardwareShopDataModels.Models;
using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class BuildViewModel : IBuildModel
{
public int Id { get; set; }
[DisplayName("Цена")]
public decimal Price { get; set; }
[DisplayName("Название компонента")]
public string BuildName { get; set; } = string.Empty;
[DisplayName("Email клиента")]
public string Email { get; set; } = string.Empty;
public int UserID { get; set; }
}
}

View File

@ -0,0 +1,23 @@
using FoodOrdersDataModels.Models;
using HardwareShopDataModels.Enums;
using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class ClientViewModel : IClientModel
{
public int Id { get; set; }
[DisplayName("Логин клиента")]
public string Login { get; set; } = string.Empty;
[DisplayName("Email клиента")]
public string Email { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Роль")]
public UserRole Role { get; set; } = UserRole.Неизвестен;
}
}

View File

@ -0,0 +1,15 @@
using FoodOrdersDataModels.Models;
using HardwareShopDataModels.Models;
using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class CommentViewModel : ICommentModel
{
public string Text => throw new NotImplementedException();
public int BuildID => throw new NotImplementedException();
public int Id => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,14 @@
using HardwareShopDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FoodOrdersContracts.ViewModels
{
public class ComponentViewModel : IComponentModel
{
public int Id => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,15 @@
using FoodOrdersDataModels.Enums;
using HardwareShopDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FoodOrdersContracts.ViewModels
{
public class GoodViewModel : IGoodModel
{
public int Id => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,11 @@
using FoodOrdersDataModels.Enums;
using FoodOrdersDataModels.Models;
using HardwareShopDataModels.Models;
using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class OrderViewModel : IOrderModel
{
public int Id => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,23 @@
using FoodOrdersDataModels.Enums;
using FoodOrdersDataModels.Models;
using HardwareShopDataModels.Models;
using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class PurachaseViewModel : IPurchaseModel
{
public int Id => throw new NotImplementedException();
public decimal Sum => throw new NotImplementedException();
public PurchaseStatus Status => throw new NotImplementedException();
public DateTime? DatePurchase => throw new NotImplementedException();
public int UserID => throw new NotImplementedException();
public Dictionary<int, (IBuildModel, int)>? PurchaseBuilds => throw new NotImplementedException();
public Dictionary<int, (IGoodModel, int)> PurchaseGoods => throw new NotImplementedException();
}
}

View File

@ -8,6 +8,7 @@ namespace HardwareShopDataModels.Enums
{
public enum UserRole
{
Неизвестен = 0,
Работник = 1,
Кладовщик = 2,
}

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
public interface IBuildModel
public interface IBuildModel : IId
{
decimal Price { get; }

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
public interface ICommentModel
public interface ICommentModel : IId
{
string Text { get; }

View File

@ -1,6 +1,6 @@
namespace HardwareShopDataModels.Models
{
public interface IComponentModel
public interface IComponentModel : IId
{
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
public interface IGoodModel
public interface IGoodModel : IId
{
}
}