BindingModels Работник
This commit is contained in:
parent
7aa8ee51c1
commit
7bf1e108c3
@ -0,0 +1,18 @@
|
||||
using FoodOrdersDataModels.Models;
|
||||
using HardwareShopDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
namespace FoodOrdersContracts.BindingModels
|
||||
{
|
||||
public class BuildSearchModel : IBuildModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public decimal Price { get; set; }
|
||||
|
||||
public string BuildName { get; set; } = string.Empty;
|
||||
|
||||
public int UserID { get; set; }
|
||||
|
||||
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using FoodOrdersDataModels.Models;
|
||||
using HardwareShopDataModels.Enums;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FoodOrdersContracts.BindingModels
|
||||
{
|
||||
public class ClientBindingModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Login { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
public UserRole Role { get; set; } = UserRole.Неизвестен;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using FoodOrdersDataModels.Models;
|
||||
using HardwareShopDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FoodOrdersContracts.BindingModels
|
||||
{
|
||||
public class CommentSearchModel : ICommentModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Text { get; set; } = string.Empty;
|
||||
|
||||
public string BuildName { get; set; } = string.Empty;
|
||||
|
||||
public int BuildID { get; set; }
|
||||
}
|
||||
}
|
@ -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.BindingModels
|
||||
{
|
||||
public class ComponentSearchModel : IComponentModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -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.BindingModels
|
||||
{
|
||||
public class GoodBindingModel : IGoodModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using FoodOrdersDataModels.Enums;
|
||||
using FoodOrdersDataModels.Models;
|
||||
using HardwareShopDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
namespace FoodOrdersContracts.BindingModels
|
||||
{
|
||||
public class OrderSearchModel : IOrderModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
using FoodOrdersDataModels.Enums;
|
||||
using FoodOrdersDataModels.Models;
|
||||
using HardwareShopDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
namespace FoodOrdersContracts.BindingModels
|
||||
{
|
||||
public class PurachaseViewModel : IPurchaseModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Цена")]
|
||||
public decimal Sum { get; set; }
|
||||
|
||||
[DisplayName("Статус покупки")]
|
||||
public PurchaseStatus PurchaseStatus { get; set; } = PurchaseStatus.Неизвестен;
|
||||
|
||||
[DisplayName("Дата оплаты")]
|
||||
public DateTime? DatePurchase { get; set; }
|
||||
|
||||
public int UserID { get; set; }
|
||||
|
||||
[DisplayName("Email клиента")]
|
||||
public string UserEmail { get; set; } = string.Empty;
|
||||
|
||||
public Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; set; }
|
||||
|
||||
public Dictionary<int, (IGoodModel, int)> PurchaseGoods { get; set; } = new();
|
||||
}
|
||||
}
|
@ -17,5 +17,7 @@ namespace FoodOrdersContracts.ViewModels
|
||||
public string UserEmail { get; set; } = string.Empty;
|
||||
|
||||
public int UserID { get; set; }
|
||||
|
||||
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using System.ComponentModel;
|
||||
|
||||
namespace FoodOrdersContracts.ViewModels
|
||||
{
|
||||
public class ClientViewModel : IClientModel
|
||||
public class ClientBindingModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace FoodOrdersContracts.ViewModels
|
||||
{
|
||||
public class GoodViewModel : IGoodModel
|
||||
public class GoodBindingModel : IGoodModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
@ -24,6 +24,6 @@ namespace FoodOrdersContracts.ViewModels
|
||||
|
||||
public Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; set; }
|
||||
|
||||
public Dictionary<int, (IGoodModel, int)> PurchaseGoods { get; set; }
|
||||
public Dictionary<int, (IGoodModel, int)> PurchaseGoods { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -14,5 +14,7 @@ namespace HardwareShopDataModels.Models
|
||||
string BuildName { get; }
|
||||
|
||||
int UserID { get; }
|
||||
|
||||
Dictionary<int, (IComponentModel, int)>? BuildComponents { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user