Коммит, которого не будет в финале
This commit is contained in:
parent
3ac908b925
commit
1bca64b238
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -10,10 +11,15 @@ namespace Workshop.Entities;
|
||||
public class Master
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
[DisplayName("Имя")]
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
[DisplayName("Фамилия")]
|
||||
public string LastName { get; private set; } = string.Empty;
|
||||
[DisplayName("Возраст")]
|
||||
public int Age { get; private set; }
|
||||
[DisplayName("Должность")]
|
||||
public MasterPosition Position { get; private set; }
|
||||
public string fullName => $"{Name} {LastName}";
|
||||
|
||||
public static Master CreateEntity(int id, string name, string lastName, int age, MasterPosition position)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -9,8 +10,11 @@ namespace Workshop.Entities;
|
||||
public class Material
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
[DisplayName("Количество на складе")]
|
||||
public int WarehouseAmount { get; private set; }
|
||||
[DisplayName("Цена")]
|
||||
public double Price { get; private set; }
|
||||
public static Material CreateEntity(int id, string name, int warehouseAmount, double price)
|
||||
{
|
||||
|
@ -1,14 +1,20 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Workshop.Entities;
|
||||
using Workshop.Entities.Enums;
|
||||
|
||||
public class Product
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
[DisplayName("Цена")]
|
||||
public double Price { get; private set; }
|
||||
[DisplayName("Количество на складе")]
|
||||
public int WarehouseAmount { get; private set; }
|
||||
[DisplayName("Категория")]
|
||||
public ProductCategory Category { get; private set; }
|
||||
[DisplayName("Материалы")]
|
||||
public IEnumerable<ProductMaterial> Materials { get; private set; } = [];
|
||||
public static Product CreateEntity(int id, string name, double price, int warehouseAmount,
|
||||
ProductCategory category, IEnumerable<ProductMaterial> materials)
|
||||
|
Loading…
x
Reference in New Issue
Block a user