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

32 lines
908 B
C#
Raw Normal View History

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 Duration { get; private set; }
public int Cost { get; private set; }
public static Tour CreateEntity(int id, string destination,
DateTime date, string departure, int cost, int duration)
{
return new Tour
{
Id = id,
Destination = destination,
Departure = departure,
DepartureDate = date,
Cost = cost,
Duration = duration
};
}
}