MongoDB + PostgreSQL Injection
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user