finalizare 1.0
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class Admin
|
||||
{
|
||||
[Key] public Guid Id { get; private set; } = Guid.NewGuid();
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public string Email { get; private set; } = string.Empty;
|
||||
public string Password { get; private set; } = string.Empty;
|
||||
|
||||
public void SetId(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public void SetEmail(string email)
|
||||
{
|
||||
Email = email;
|
||||
}
|
||||
|
||||
public void SetPassword(string password)
|
||||
{
|
||||
Password = password;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class Appointment
|
||||
{
|
||||
public string Id { get; private set; } = string.Empty;
|
||||
public string PatientId { get; private set; } = string.Empty;
|
||||
public string DoctorId { get; private set; } = string.Empty;
|
||||
public List<DateTime> AppointmentsList { get; 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)
|
||||
{
|
||||
var utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day,
|
||||
appointmentDate.Hour, appointmentDate.Minute, 0,
|
||||
DateTimeKind.Utc);
|
||||
AppointmentsList.Add(utcAppointmentDate);
|
||||
}
|
||||
|
||||
public void RemoveAppointment(DateTime appointmentDate)
|
||||
{
|
||||
var utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day,
|
||||
appointmentDate.Hour, appointmentDate.Minute, 0,
|
||||
DateTimeKind.Utc);
|
||||
AppointmentsList.Remove(utcAppointmentDate);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class Chat
|
||||
{
|
||||
[BsonRepresentation(BsonType.String)] public string Id { get; private set; } = string.Empty;
|
||||
public List<Message> Messages { get; private set; } = [];
|
||||
|
||||
public void SetId(string id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetMessages(List<Message> messages)
|
||||
{
|
||||
Messages = messages;
|
||||
}
|
||||
}
|
||||
|
||||
public class Message(Guid userId, string content)
|
||||
{
|
||||
[BsonRepresentation(BsonType.String)] public Guid UserId { get; private set; } = userId;
|
||||
public string Content { get; private set; } = content;
|
||||
|
||||
public void SetUserId(Guid userId)
|
||||
{
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
public void SetContent(string content)
|
||||
{
|
||||
Content = content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class Doctor
|
||||
{
|
||||
[Key] public Guid Id { get; private set; } = Guid.NewGuid();
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public string Email { get; private set; } = string.Empty;
|
||||
public string Password { get; private set; } = string.Empty;
|
||||
public string Description { get; private set; } = string.Empty;
|
||||
|
||||
public void SetId(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public void SetEmail(string email)
|
||||
{
|
||||
Email = email;
|
||||
}
|
||||
|
||||
public void SetPassword(string password)
|
||||
{
|
||||
Password = password;
|
||||
}
|
||||
|
||||
public void SetDescription(string description)
|
||||
{
|
||||
Description = description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class MedicalHistory
|
||||
{
|
||||
[Key] public Guid Id { get; private set; } = Guid.NewGuid();
|
||||
public Guid UserId { get; private set; } = Guid.Empty;
|
||||
public byte[] Content { get; private set; } = [];
|
||||
|
||||
public void SetId(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void SetUserId(Guid userId)
|
||||
{
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
public void SetContent(byte[] content)
|
||||
{
|
||||
Content = content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Domain.Entities;
|
||||
|
||||
public class Patient
|
||||
{
|
||||
[Key] public Guid Id { get; private set; } = Guid.NewGuid();
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public string Email { get; private set; } = string.Empty;
|
||||
public string Password { get; private set; } = string.Empty;
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public void SetEmail(string email)
|
||||
{
|
||||
Email = email;
|
||||
}
|
||||
|
||||
public void SetPassword(string password)
|
||||
{
|
||||
Password = password;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user