Something went wrong. Try again.
Event Sourcing Framework on top of Microsoft Orleans and PostgreSQL
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839using System.Text.Json.Serialization;
namespace Flensrocker.EventSourcing.Abstractions.PersistentProjection;
[GenerateSerializer][Alias(PersistentProjectionConstants.PersistentProjectionEvent.Base)][JsonDerivedType(typeof(ProjectionRegistered), PersistentProjectionConstants.PersistentProjectionEvent.ProjectionRegistered)][JsonDerivedType(typeof(ProjectionRebuilt), PersistentProjectionConstants.PersistentProjectionEvent.ProjectionRebuilt)]public abstract record PersistentProjectionEvent{ private PersistentProjectionEvent() { }
[GenerateSerializer] [Alias(PersistentProjectionConstants.PersistentProjectionEvent.ProjectionRegistered)] public sealed record ProjectionRegistered : PersistentProjectionEvent { [Id(0)] [JsonPropertyName("TypeName")] public required string TypeName { get; init; } }
[GenerateSerializer] [Alias(PersistentProjectionConstants.PersistentProjectionEvent.ProjectionRebuilt)] public sealed record ProjectionRebuilt : PersistentProjectionEvent { [Id(0)] [JsonPropertyName("TypeName")] public required string TypeName { get; init; }
[Id(1)] [JsonPropertyName("Version")] public required int Version { get; init; }
[Id(2)] [JsonPropertyName("Forced")] public bool Forced { get; init; } }}