PIBD_21_Basalov_A_D_Project.../project/ProjectTourAgency/Enities/Tour.cs

30 lines
815 B
C#

using ProjectTourAgency.Enities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectTourAgency.Enities;
public class Tour
{
public int Id { get; private set; }
public string Destination { get; private set; } = string.Empty;
public string Departure { get; private set; } = string.Empty;
public DateTime DepartureDate { get; private set; }
public int Cost { get; private set; }
public static Tour CreateEntity(int id, string destination,
DateTime date, string departure, int cost)
{
return new Tour
{
Id = id,
Destination = destination,
Departure = departure,
DepartureDate = date,
Cost = cost
};
}
}