-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ed60b3
commit 9ea2297
Showing
11 changed files
with
98 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/Cik.Magazine.CategoryService/Denomalizer/Messages/CreateNewCategory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
using System; | ||
using Cik.Magazine.Shared; | ||
using Cik.Magazine.Shared.Messages.Category; | ||
|
||
namespace Cik.Magazine.CategoryService.Denomalizer.Messages | ||
{ | ||
public class CreateNewCategory | ||
{ | ||
public CreateNewCategory(Guid id, string name, Guid parentId) | ||
public CreateNewCategory(Guid id, string name, Status status) | ||
{ | ||
Id = id; | ||
Name = name; | ||
ParentId = parentId; | ||
Status = status; | ||
Created = SystemClock.UtcNow; | ||
} | ||
|
||
public Guid Id { get; } | ||
public string Name { get; } | ||
public Guid ParentId { get; } | ||
public Status Status { get; } | ||
public DateTime Created { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Cik.Magazine.CategoryService/Sagas/ReviewCategorySaga.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using Akka.Persistence.Fsm; | ||
using Cik.Magazine.Shared; | ||
using Cik.Magazine.Shared.Messages.Category; | ||
|
||
namespace Cik.Magazine.CategoryService.Sagas | ||
{ | ||
public interface IReviewEvent | ||
{ | ||
} | ||
|
||
public class RemindAdminReview : IReviewEvent | ||
{ | ||
} | ||
|
||
public class ReviewCategorySaga : PersistentFSM<Status, Event, IReviewEvent> | ||
{ | ||
private readonly Guid _id; | ||
|
||
public ReviewCategorySaga(Guid id) | ||
{ | ||
_id = id; | ||
} | ||
|
||
public override string PersistenceId => $"{GetType().Name}-agg-{_id:n}".ToLowerInvariant(); | ||
|
||
protected override void OnRecoveryCompleted() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
protected override Event ApplyEvent(IReviewEvent e, Event data) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Cik.Magazine.Shared.Messages.Category | ||
{ | ||
public enum Status | ||
{ | ||
Reviewing, | ||
Published | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters