30 lines
850 B
C#
Raw Permalink Normal View History

2024-12-20 11:46:58 +04:00
using System.ComponentModel;
namespace ProjectLibrary.Entities
2024-11-12 23:13:20 +04:00
{
public class Reader
{
public int Id { get; private set; }
2024-12-20 11:46:58 +04:00
2024-12-20 15:49:09 +04:00
[DisplayName("ФИО")]
2024-11-12 23:13:20 +04:00
public string Name { get; private set; } = string.Empty;
2024-12-20 11:46:58 +04:00
[DisplayName("Читательский билет")]
2024-11-12 23:13:20 +04:00
public int ReaderTicket { get; private set; }
2024-12-20 11:46:58 +04:00
[DisplayName("Дата регистрации")]
2024-11-12 23:13:20 +04:00
public DateTime RegistrationDateRT { get; private set; } // Изменение на DateTime
public static Reader CreateEntity(int id, string name, int readerTicket)
2024-11-12 23:13:20 +04:00
{
return new Reader
{
Id = id,
Name = name ?? string.Empty,
ReaderTicket = readerTicket,
RegistrationDateRT = DateTime.Now
2024-11-12 23:13:20 +04:00
};
}
}
}