viewmodels #2

Merged
bekodeg merged 1 commits from BACKDEV-402 into dev 2024-04-24 19:08:14 +04:00
8 changed files with 125 additions and 0 deletions
Showing only changes of commit 1a9edefdb9 - Show all commits

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class BuildModelContracts : IBuildModel
{
public int Id { get; set; }
[DisplayName("Название сборки")]
public string BuildName { get; }
[DisplayName("Стоимость")]
public double Price { get; }
public int VendorId { get; }
public Dictionary<int, (IComponentModel, int)> BuildComponent { get; }
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class CommentModelContracts : ICommentModel
{
public int Id { get; set; }
public DateTime Date { get; set; }
public string Text { get; set; }
public int BuildId { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class ComponentModelContracts : IComponentModel
{
public int Id { get; set; }
[DisplayName("Название компонента")]
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class OrderModelContracts : IOrderModel
{
public int Id { get; set; }
[DisplayName("Стоимость")]
public double Cost { get; set; }
[DisplayName("Дата создания")]
DateTime DateCreate { get; set; }
public Dictionary<int, (IProductModel, int)> OrderProduct { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class ProductModelContracts : IProductModel
{
public int Id { get; set; }
[DisplayName("Название изделия")]
public string CannedName { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> CannedComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,20 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class PurchaseModelContracts : IPurchaseModel
{
public int Id { get; set; }
[DisplayName("Стоимость")]
public double Cost { get; set; }
[DisplayName("Дата создания")]
public DateTime DateCreate { get; set; }
public int VendorId { get; set; }
[DisplayName("Сумма")]
public double Sum { get; set; }
public Dictionary<int, (IBuildModel, int)> PurchaseBuild { get; set; }
public Dictionary<int, (IProductModel, int)> PurchaseProduct { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class StoreKeeperModelContracts : IStoreKeeperModel
{
public int Id { get; set; }
[DisplayName("Имя кладовщика")]
public string Name { get; set; }
[DisplayName("Логин")]
public string Login { get; set; }
[DisplayName("Пароль")]
public string Password { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class VendorModelContracts : IVendorModel
{
public int Id { get; set; }
[DisplayName("Имя продавца")]
public string Name { get; set; }
[DisplayName("Логин")]
public string Login { get; set; }
[DisplayName("Пароль")]
public string Password { get; set; }
}
}