2024-12-11 19:40:18 +04:00
|
|
|
|
using ProjectHorseRacingOrg.Entities.Enums;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2024-12-24 21:26:31 +04:00
|
|
|
|
using System.ComponentModel;
|
2024-12-11 19:40:18 +04:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectHorseRacingOrg.Entities;
|
|
|
|
|
|
|
|
|
|
public class Jockey
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
2024-12-24 21:26:31 +04:00
|
|
|
|
|
|
|
|
|
[DisplayName("Имя")]
|
2024-12-11 19:40:18 +04:00
|
|
|
|
public string FirstName { get; private set; } = string.Empty;
|
2024-12-24 21:26:31 +04:00
|
|
|
|
|
|
|
|
|
[DisplayName("Фамилия")]
|
2024-12-11 19:40:18 +04:00
|
|
|
|
public string LastName { get; private set; } = string.Empty;
|
2024-12-24 21:26:31 +04:00
|
|
|
|
|
|
|
|
|
public string FullName => $"{LastName} {FirstName}";
|
|
|
|
|
|
|
|
|
|
[DisplayName("Титул")]
|
2024-12-11 19:40:18 +04:00
|
|
|
|
public JockeyTitle JockeyTitle { get; private set; }
|
2024-12-24 21:26:31 +04:00
|
|
|
|
|
2024-12-11 19:40:18 +04:00
|
|
|
|
public static Jockey CreateEntity(int id, string first, string last,
|
|
|
|
|
JockeyTitle jockeyTitle)
|
|
|
|
|
{
|
|
|
|
|
return new Jockey
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
FirstName = first ?? string.Empty,
|
|
|
|
|
LastName = last ?? string.Empty,
|
|
|
|
|
JockeyTitle = jockeyTitle
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|