chatbot/Chatbot.Api.Application/Commands/SaveChatMessage.cs

23 lines
708 B
C#
Raw Normal View History

2020-06-06 23:44:49 +03:00
using Chatbot.Api.Application.Events;
using System;
namespace Chatbot.Api.Application.Commands
{
public class SaveChatMessage : Command<ChatMessageSaved>
{
public Guid ChatId { get; }
public int MessageSourceId { get; }
public DateTime MessageDate { get; }
public string MessageContent { get; }
public SaveChatMessage(Guid chatId, int messageSourceId, DateTime messageDate, string messageContent)
: base(new Metadata() { CorrelationId = Guid.NewGuid() })
{
ChatId = chatId;
MessageSourceId = messageSourceId;
MessageDate = messageDate;
MessageContent = messageContent;
}
}
}