ISEbd-22_Rozhkov.I.E._Simple/GasStation/Entities/Gasman.cs

30 lines
745 B
C#
Raw Normal View History

2024-12-02 14:38:24 +04:00
using GasStation.Entities.Enums;
using System.ComponentModel;
2024-12-02 14:38:24 +04:00
namespace GasStation.Entities;
2024-11-13 23:20:06 +04:00
public class Gasman
{
public int Id { get; private set; }
[DisplayName("Имя заправщика")]
2024-11-13 23:20:06 +04:00
public string GasmanName { get; private set; } = string.Empty;
[DisplayName("Телефон")]
2024-11-13 23:20:06 +04:00
public string PhoneNumber { get; private set; } = string.Empty;
[DisplayName("Должность")]
2024-12-02 14:38:24 +04:00
public Post Post { get; private set; }
public static Gasman CreateGasman(int id, string gasmanName, string phoneNumber, Post post)
2024-11-13 23:20:06 +04:00
{
return new Gasman
{
Id = id,
GasmanName = gasmanName,
2024-12-02 14:38:24 +04:00
PhoneNumber = phoneNumber,
Post = post
2024-11-13 23:20:06 +04:00
};
}
}