2024-11-23 23:26:39 +03:00
|
|
|
|
|
|
|
|
|
using ProductionInCehOTP.Entities.Enums;
|
|
|
|
|
|
|
|
|
|
namespace ProductionInCehOTP.Entities;
|
2024-11-12 19:18:35 +03:00
|
|
|
|
|
|
|
|
|
public class Material
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
2024-11-23 23:26:39 +03:00
|
|
|
|
public NameOfMaterials Name { get; private set; }
|
2024-11-28 10:57:27 +03:00
|
|
|
|
public int ArrivalMaterialID { get; private set; }
|
2024-11-23 23:26:39 +03:00
|
|
|
|
public IEnumerable<MaterialForProduct> MaterialForProducts { get; private set; }
|
2024-12-10 00:09:57 +03:00
|
|
|
|
|
|
|
|
|
public DateTime DateArrivalToProduct { get; private set; }
|
2024-12-11 00:42:59 +03:00
|
|
|
|
public static Material TransferMaterial(int id, NameOfMaterials name, int arrivalMaterialsID, IEnumerable<MaterialForProduct> materialForProducts, DateTime dateArrivalToProduct)
|
2024-11-12 19:18:35 +03:00
|
|
|
|
{
|
|
|
|
|
return new Material
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
Name = name,
|
2024-11-28 10:57:27 +03:00
|
|
|
|
ArrivalMaterialID = arrivalMaterialsID,
|
2024-12-10 00:09:57 +03:00
|
|
|
|
MaterialForProducts = materialForProducts,
|
|
|
|
|
DateArrivalToProduct = dateArrivalToProduct
|
2024-11-12 19:18:35 +03:00
|
|
|
|
};
|
|
|
|
|
}
|
2024-12-11 00:42:59 +03:00
|
|
|
|
|
|
|
|
|
public static Material TransferMaterial(TempMaterialForProduct tempMaterialForProduct, IEnumerable<MaterialForProduct> materialForProducts)
|
|
|
|
|
{
|
|
|
|
|
return new Material
|
|
|
|
|
{
|
|
|
|
|
Id = tempMaterialForProduct.ID,
|
|
|
|
|
Name = tempMaterialForProduct.Name,
|
|
|
|
|
ArrivalMaterialID = tempMaterialForProduct.ArrivalMaterialID,
|
|
|
|
|
DateArrivalToProduct = tempMaterialForProduct.DateArrivalToProduct,
|
|
|
|
|
MaterialForProducts = materialForProducts,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-12 19:18:35 +03:00
|
|
|
|
}
|
|
|
|
|
|