30 lines
886 B
C#
30 lines
886 B
C#
namespace ProjectOptika.Scripts.Entities
|
|
{
|
|
public class Order
|
|
{
|
|
public int ID { get; private set; }
|
|
|
|
public int EmployeeID { get; private set; }
|
|
|
|
public int ClientID { get; private set; }
|
|
|
|
public DateTime OrderDate { get; private set; }
|
|
|
|
public double TotalCost { get; private set; }
|
|
|
|
public IEnumerable<AccessoriesOrder> AccesoriesOrders { get; private set; } = [];
|
|
|
|
public static Order CreateOperation(int id, int employeeID, int clientID, double totalCost, IEnumerable<AccessoriesOrder> accesoriesOrders)
|
|
{
|
|
return new Order {
|
|
ID = id,
|
|
EmployeeID = employeeID,
|
|
ClientID = clientID,
|
|
OrderDate = DateTime.Now,
|
|
TotalCost = totalCost,
|
|
AccesoriesOrders = accesoriesOrders
|
|
};
|
|
}
|
|
}
|
|
}
|