Почти доделал

This commit is contained in:
2025-05-27 17:31:03 +04:00
parent da946e07ce
commit 491df32c85
279 changed files with 172737 additions and 1121 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,12 +9,8 @@ namespace ComputerStoreContracts.ViewModels;
public class AssemblyViewModel
{
public int Id { get; set; }
[DisplayName("Имя сборки")]
public string AssemblyName { get; set; } = string.Empty;
[DisplayName("Описание сборки")]
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public int UserID { get; set; }
public int? OrderRequestId { get; set; }
public int UserId { get; set; }
public List<int> ComponentIds { get; set; } = new();
}

View File

@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels;
public class ComponentRequestAssemblyReportViewModel
{
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Даты запросов")]
public List<DateTime> DateRequests { get; set; } = new();
[DisplayName("Сборки")]
public List<string> Assemblies { get; set; } = new();
[DisplayName("Производитель")]
public string Manufacturer { get; set; } = string.Empty;
[DisplayName("ID компонента")]
public int ComponentId { get; set; }
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,12 +9,8 @@ namespace ComputerStoreContracts.ViewModels;
public class ComponentViewModel
{
public int Id { get; set; }
[DisplayName("Имя комплектующего")]
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Производитель")]
public string Name { get; set; } = string.Empty;
public string Manufacturer { get; set; } = string.Empty;
public double Price { get; set; }
public decimal Price { get; set; }
public int UserId { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels;
public class OrderBatchViewModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public int UserId { get; set; }
public DateTime CreatedAt { get; set; }
public int? ProductId { get; set; }
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels;
public class OrderReportViewModel
{
public int OrderId { get; set; }
public string OrderStatus { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public int RequestId { get; set; }
public string RequestDescription { get; set; } = string.Empty;
public int ProductId { get; set; }
public string ProductName { get; set; } = string.Empty;
public decimal ProductPrice { get; set; }
public int UserId { get; set; }
public string UserFIO { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels;
public class OrderViewModel
{
public int Id { get; set; }
public string Status { get; set; } = string.Empty;
public int UserId { get; set; }
public DateTime CreatedAt { get; set; }
public List<int> RequestIds { get; set; } = new();
public List<int> BatchIds { get; set; } = new();
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,15 +9,8 @@ namespace ComputerStoreContracts.ViewModels;
public class ProductViewModel
{
public int Id { get; set; }
[DisplayName("Название товара")]
public string ProductName { get; set; } = string.Empty;
[DisplayName("Категория товара")]
public string Category { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Price { get; set; }
public int UserID { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public int UserId { get; set; }
public List<int> ComponentIds { get; set; } = new();
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -9,17 +8,9 @@ namespace ComputerStoreContracts.ViewModels;
public class RequestViewModel
{
[DisplayName("Дата создания")]
public DateTime DateRequest { get; set; } = DateTime.Now;
[DisplayName("ID сборки")]
public int? AssemblyId { get; set; }
public AssemblyViewModel? Assembly { get; set; }
[DisplayName("Номер")]
public int Id { get; set; }
[DisplayName("ID пользователя")]
public int UserID { get; set; }
}
public string Description { get; set; } = string.Empty;
public int UserId { get; set; }
public int? AssemblyId { get; set; }
public DateTime CreatedAt { get; set; }
}

View File

@@ -1,27 +1,18 @@
using ComputerStoreContracts.Enums;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ComputerStoreContracts.Enums;
namespace ComputerStoreContracts.ViewModels;
public class UserViewModel
{
public int Id { get; set; }
[DisplayName("Логин")]
public int ID { get; set; }
public string Login { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("ФИО")]
public string FIO { get; set; } = string.Empty;
[DisplayName("Почта")]
public string Email { get; set; } = string.Empty;
public UserType UserType { get; set; }
public string Password { get; set; } = string.Empty;
public UserType RoleType { get; set; }
}