34 lines
737 B
C#
34 lines
737 B
C#
using ShoeStore.Entities.Enums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ShoeStore.Entities;
|
|
|
|
public class Sale
|
|
{
|
|
public int Id { get; private set; }
|
|
public DateTime DateOfSale { get; private set; }
|
|
|
|
public int SalesNumber { get; private set; }
|
|
public IEnumerable<ProductSale> Product
|
|
{
|
|
get;
|
|
private set;
|
|
} = [];
|
|
|
|
public static Sale CreateOperation(int id, int salesNumber, DateTime date, IEnumerable<ProductSale> product)
|
|
{
|
|
return new Sale
|
|
{
|
|
Id = id,
|
|
DateOfSale = date,
|
|
SalesNumber = salesNumber,
|
|
Product = product
|
|
};
|
|
}
|
|
|
|
}
|