namespace ProjectPatientAccounting.Entities;

public class Patient
{
    public int Id { get; private set; }
    public string Name { get; private set; } = string.Empty;
    public string Surname { get; private set; } = string.Empty;
    public string Telephone { get; private set; } = string.Empty;
    public int NumMedCard { get; private set; }

    public static Patient CreateEntity(int id, string name, string surname, string telephone, int numMedCard)
    {
        return new Patient
        {
            Id = id,
            Name = name ?? string.Empty,
            Surname = surname ?? string.Empty,
            Telephone = telephone ?? string.Empty,
            NumMedCard = numMedCard
        };
    }
}
