2024-11-19 19:46:02 +04:00
|
|
|
|
using Microsoft.VisualBasic;
|
|
|
|
|
using System;
|
2024-11-12 23:13:20 +04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectLibrary.Entites
|
|
|
|
|
{
|
|
|
|
|
public class Orders
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
2024-11-19 19:46:02 +04:00
|
|
|
|
public DateTime OrderDate { get; private set; }
|
|
|
|
|
public DateTime ReturnDate { get; private set; }
|
2024-11-12 23:13:20 +04:00
|
|
|
|
public int ReaderID { get; private set; }
|
|
|
|
|
|
2024-11-19 19:46:02 +04:00
|
|
|
|
public IEnumerable<Book_Orders> BookOrders
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
private set;
|
|
|
|
|
} = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Orders CreateEntity(int id, DateTime orderDate, DateTime returnDate, int readerID, IEnumerable<Book_Orders> bookOrders)
|
2024-11-12 23:13:20 +04:00
|
|
|
|
{
|
|
|
|
|
return new Orders
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
OrderDate = orderDate,
|
|
|
|
|
ReturnDate = returnDate,
|
2024-11-19 19:46:02 +04:00
|
|
|
|
ReaderID = readerID,
|
|
|
|
|
BookOrders = bookOrders
|
2024-11-12 23:13:20 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|