BindingModels Работник

This commit is contained in:
Николай 2023-04-01 12:58:12 +04:00
parent 7aa8ee51c1
commit 7bf1e108c3
12 changed files with 130 additions and 3 deletions

View File

@ -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; }
}
}

View File

@ -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.Неизвестен;
}
}

View File

@ -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; }
}
}

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.BindingModels
{
public class ComponentSearchModel : IComponentModel
{
public int Id { get; set; }
}
}

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.BindingModels
{
public class GoodBindingModel : IGoodModel
{
public int Id { get; set; }
}
}

View File

@ -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; }
}
}

View File

@ -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();
}
}

View File

@ -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; }
}
}

View File

@ -4,7 +4,7 @@ using System.ComponentModel;
namespace FoodOrdersContracts.ViewModels
{
public class ClientViewModel : IClientModel
public class ClientBindingModel : IClientModel
{
public int Id { get; set; }

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace FoodOrdersContracts.ViewModels
{
public class GoodViewModel : IGoodModel
public class GoodBindingModel : IGoodModel
{
public int Id { get; set; }
}

View File

@ -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();
}
}

View File

@ -14,5 +14,7 @@ namespace HardwareShopDataModels.Models
string BuildName { get; }
int UserID { get; }
Dictionary<int, (IComponentModel, int)>? BuildComponents { get; }
}
}