using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjectShoeShop.Entities;

public class Order
{
    public int Id { get; private set; }

    public int ClientId { get; private set;}

    public DateTime OrderDate { get; private set; }

    public IEnumerable<OrderItem> OrderItems { get; private set; } = [];

    public static Order CreateOperation(int id, int clientid, DateTime date, IEnumerable<OrderItem> orderItems)
    {
        return new Order
        {
            Id = id,
            ClientId = clientid,
            OrderDate = date,
            OrderItems = orderItems
        };
    }
}
