MongoDB + PostgreSQL Injection

This commit is contained in:
andrei-mihnea-cerbu
2024-04-04 17:49:10 +03:00
parent 041abb5900
commit 22f171b560
143 changed files with 3239 additions and 437 deletions
+16 -13
View File
@@ -1,22 +1,25 @@
using System.ComponentModel.DataAnnotations;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Core.Entities
{
public class Chat
{
public Chat()
{
Id = Guid.NewGuid();
}
[BsonId]
[BsonRepresentation(BsonType.String)]
public Guid Id { get; set; }
[Key]
public Guid Id { get; private set; }
public Guid UserId { get; private set; }
public Guid DoctorId { get; private set; }
public string? Content { get; private set; }
public Guid PatientId { get; set; }
public Guid DoctorId { get; set; }
public void SetUserId(Guid userId) { UserId = userId; }
public void SetDoctorId(Guid doctorId) { DoctorId = doctorId; }
public void SetContent(string content) { Content = content; }
public List<Message> Messages { get; set; } = new List<Message>();
}
public class Message
{
[BsonRepresentation(BsonType.String)]
public Guid UserId { get; set; }
public string Content { get; set; }
}
}