mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using System;
|
|
using CleanArchitecture.Domain.Notifications;
|
|
|
|
namespace CleanArchitecture.Domain.DomainNotifications;
|
|
|
|
public class StoredDomainNotification : DomainNotification
|
|
{
|
|
public StoredDomainNotification(
|
|
DomainNotification domainNotification,
|
|
string data,
|
|
string user,
|
|
string correlationId) : base(
|
|
domainNotification.Key,
|
|
domainNotification.Value,
|
|
domainNotification.Code,
|
|
null,
|
|
domainNotification.AggregateId)
|
|
{
|
|
Id = Guid.NewGuid();
|
|
User = user;
|
|
SerializedData = data;
|
|
CorrelationId = correlationId;
|
|
|
|
MessageType = domainNotification.MessageType;
|
|
}
|
|
|
|
// EF Constructor
|
|
protected StoredDomainNotification() : base(string.Empty, string.Empty, string.Empty)
|
|
{
|
|
}
|
|
|
|
public Guid Id { get; private set; }
|
|
public string SerializedData { get; private set; } = string.Empty;
|
|
public string User { get; private set; } = string.Empty;
|
|
public string CorrelationId { get; private set; } = string.Empty;
|
|
} |