Добавленны ViewModel реализованны только некоторые
This commit is contained in:
parent
995cc92189
commit
4d4b783b27
@ -6,4 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\HardwareShopDataModels\HardwareShopDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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.Неизвестен;
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ namespace HardwareShopDataModels.Enums
|
||||
{
|
||||
public enum UserRole
|
||||
{
|
||||
Неизвестен = 0,
|
||||
Работник = 1,
|
||||
Кладовщик = 2,
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace HardwareShopDataModels.Models
|
||||
{
|
||||
public interface IBuildModel
|
||||
public interface IBuildModel : IId
|
||||
{
|
||||
decimal Price { get; }
|
||||
|
||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace HardwareShopDataModels.Models
|
||||
{
|
||||
public interface ICommentModel
|
||||
public interface ICommentModel : IId
|
||||
{
|
||||
string Text { get; }
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace HardwareShopDataModels.Models
|
||||
{
|
||||
public interface IComponentModel
|
||||
public interface IComponentModel : IId
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace HardwareShopDataModels.Models
|
||||
{
|
||||
public interface IGoodModel
|
||||
public interface IGoodModel : IId
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user