medicalHistory: deletion when patient is deleted
This commit is contained in:
@@ -6,25 +6,38 @@ public class 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 List<DateTime> AppointmentsList { get; }
|
||||
|
||||
public void SetId(string id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetPatientId(string patientId)
|
||||
{
|
||||
PatientId = patientId;
|
||||
}
|
||||
|
||||
public void SetDoctorIid(string doctorId)
|
||||
{
|
||||
DoctorId = doctorId;
|
||||
}
|
||||
|
||||
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);
|
||||
var 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);
|
||||
var utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day, 0, 0, 0,
|
||||
DateTimeKind.Utc);
|
||||
AppointmentsList.Remove(utcAppointmentDate);
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,15 @@ public class Chat
|
||||
public string Id { get; private set; }
|
||||
public List<Message> Messages { get; private set; } = new();
|
||||
|
||||
public void SetId(string id) { Id = id; }
|
||||
public void SetMessages(List<Message> messages) { Messages = messages; }
|
||||
public void SetId(string id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetMessages(List<Message> messages)
|
||||
{
|
||||
Messages = messages;
|
||||
}
|
||||
}
|
||||
|
||||
public class Message
|
||||
@@ -19,12 +26,18 @@ public class Message
|
||||
UserId = userId;
|
||||
Content = content;
|
||||
}
|
||||
|
||||
[BsonRepresentation(BsonType.String)]
|
||||
public Guid UserId { get; private set; }
|
||||
|
||||
[BsonRepresentation(BsonType.String)] public Guid UserId { get; private set; }
|
||||
|
||||
public string Content { get; private set; }
|
||||
|
||||
public void SetUserId(Guid userId) { UserId = userId; }
|
||||
public void SetContent(string content) { Content = content; }
|
||||
public void SetUserId(Guid userId)
|
||||
{
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
public void SetContent(string content)
|
||||
{
|
||||
Content = content;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user