PIBD_21_Basalov_A_D_Project.../project/ProjectTourAgency/Enities/Client.cs

46 lines
1.2 KiB
C#

using ProjectTourAgency.Enities.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectTourAgency.Enities;
public class Client
{
public int Id { get; private set; }
[DisplayName("Полное имя")]
public string FullName { get; private set; } = string.Empty;
[DisplayName("Дата рождения")]
public DateTime BirthDate { get; private set; }
[DisplayName("Номер телефона")]
public string PhoneNumber { get; private set; } = string.Empty;
[DisplayName("Статус клиента")]
public ClientStatus ClientStatus { get; private set; }
[DisplayName("Баланс")]
public int Money { get; private set; }
public static Client CreateEntity(int id, string fullName,
DateTime birthDate, string phoneNumber, int money, ClientStatus cs)
{
return new Client
{
Id = id,
ClientStatus = cs,
FullName = fullName,
BirthDate = birthDate,
PhoneNumber = phoneNumber,
Money = money
};
}
}