30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
namespace Core.Entities;
|
|
|
|
public class Appointment
|
|
{
|
|
public Appointment()
|
|
{
|
|
AppointmentsList = new List<DateTime>();
|
|
}
|
|
|
|
public string Id { get; private set; }
|
|
public string PatientId { get; private set; }
|
|
public string DoctorId { get; private set; }
|
|
public List<DateTime> AppointmentsList { get; private set; }
|
|
|
|
public void SetId(string id) { Id = id; }
|
|
public void SetPatientId(string patientId) { PatientId = patientId; }
|
|
public void SetDoctorIid(string doctorId) { DoctorId = doctorId; }
|
|
|
|
public void AddAppointment(DateTime appointmentDate)
|
|
{
|
|
DateTime utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day, 0, 0, 0, DateTimeKind.Utc);
|
|
AppointmentsList.Add(utcAppointmentDate);
|
|
}
|
|
|
|
public void RemoveAppointment(DateTime appointmentDate)
|
|
{
|
|
DateTime utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day, 0, 0, 0, DateTimeKind.Utc);
|
|
AppointmentsList.Remove(utcAppointmentDate);
|
|
}
|
|
} |