-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Merge ArtEvent Management into develop
- Loading branch information
Showing
9 changed files
with
136 additions
and
6 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
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
28 changes: 28 additions & 0 deletions
28
...RUSTARS/AtEventManagement/Application/artevents/events/ArtEventRescheduledEventHandler.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,28 @@ | ||
using MediatR; | ||
using PERUSTARS.AtEventManagement.Domain.Model.domainevents; | ||
using PERUSTARS.CommunicationAndNotificationManagement.Domain.Model.Commands; | ||
using PERUSTARS.CommunicationAndNotificationManagement.Domain.Services; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace PERUSTARS.AtEventManagement.Application.artevents.events | ||
{ | ||
public class ArtEventRescheduledEventHandler : INotificationHandler<ArtEventRescheduledEvent> | ||
{ | ||
private readonly INotificationCommandService _notificationCommandService; | ||
public ArtEventRescheduledEventHandler(INotificationCommandService notificationCommandService) | ||
{ | ||
_notificationCommandService = notificationCommandService; | ||
} | ||
public async Task Handle(ArtEventRescheduledEvent notification, CancellationToken cancellationToken) | ||
{ | ||
NotifyArtEventRescheduledCommand notifyArtEventRescheduledCommand = new NotifyArtEventRescheduledCommand(); | ||
notifyArtEventRescheduledCommand.Title = notification.Title; | ||
notifyArtEventRescheduledCommand.Description = notification.Description; | ||
notifyArtEventRescheduledCommand.Location = notification.Location; | ||
notifyArtEventRescheduledCommand.StartDate = notification.StartDate; | ||
notifyArtEventRescheduledCommand.CurrentStatus = notification.CurrentStatus; | ||
await _notificationCommandService.ExecuteNotifyArtEventRescheduledCommand(notifyArtEventRescheduledCommand); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...PERUSTARS/AtEventManagement/Application/artevents/events/CancelledArtEventEventHandler.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,33 @@ | ||
using MediatR; | ||
using PERUSTARS.AtEventManagement.Domain.Model.domainevents; | ||
using PERUSTARS.CommunicationAndNotificationManagement.Domain.Model.Commands; | ||
using PERUSTARS.CommunicationAndNotificationManagement.Domain.Services; | ||
using PERUSTARS.Shared.Domain.Repositories; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace PERUSTARS.AtEventManagement.Application.artevents.events | ||
{ | ||
public class CancelledArtEventEventHandler : INotificationHandler<ArtEventCancelledEvent> | ||
{ | ||
private readonly IUnitOfWork _unitOfWork; | ||
private readonly INotificationCommandService _notificationCommandService; | ||
public CancelledArtEventEventHandler(INotificationCommandService notificationCommandService, IUnitOfWork unitOfWork) | ||
{ | ||
_notificationCommandService = notificationCommandService; | ||
_unitOfWork = unitOfWork; | ||
} | ||
|
||
public async Task Handle(ArtEventCancelledEvent notification, CancellationToken cancellationToken) | ||
{ | ||
NotifyArtEventCancelledCommand notifyArtEventCancelledCommand = new NotifyArtEventCancelledCommand(); | ||
notifyArtEventCancelledCommand.Title = notification.Title; | ||
notifyArtEventCancelledCommand.Description= notification.Description; | ||
notifyArtEventCancelledCommand.Location = notification.Location; | ||
notifyArtEventCancelledCommand.EndDate = notification.EndDate; | ||
notifyArtEventCancelledCommand.CurrentStatus = notification.CurrentStatus; | ||
notifyArtEventCancelledCommand.StartDate = notification.StartDate; | ||
await _notificationCommandService.ExecuteNotifyArtEventCancelledCommand(notifyArtEventCancelledCommand); | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
PERUSTARS/PERUSTARS/AtEventManagement/Domain/Model/domainevents/ArtEventCancelledEvent.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,16 @@ | ||
using MediatR; | ||
using PERUSTARS.AtEventManagement.Domain.Model.ValueObjects; | ||
using System; | ||
|
||
namespace PERUSTARS.AtEventManagement.Domain.Model.domainevents | ||
{ | ||
public class ArtEventCancelledEvent:INotification | ||
{ | ||
public string Title { set; get; } | ||
public string Description { set; get; } | ||
public Location Location { set; get; } | ||
public DateTime StartDate { get; set; } //ArtEventStartDate | ||
public DateTime EndDate { get; set; } //ArtEventEndDate | ||
public ArtEventStatus CurrentStatus { get; set; } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
PERUSTARS/PERUSTARS/AtEventManagement/Domain/Model/domainevents/ArtEventRescheduledEvent.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,15 @@ | ||
using MediatR; | ||
using PERUSTARS.AtEventManagement.Domain.Model.ValueObjects; | ||
using System; | ||
|
||
namespace PERUSTARS.AtEventManagement.Domain.Model.domainevents | ||
{ | ||
public class ArtEventRescheduledEvent:INotification | ||
{ | ||
public string Title { get; set; } //ArtEventTitle | ||
public string Description { get; set; } //ArtEventDescription | ||
public Location Location { get; set; } //ArtEventLocation | ||
public DateTime StartDate { get; set; } //ArtEventStartDate | ||
public ArtEventStatus CurrentStatus { get; set; } //ArtEventStatus | ||
} | ||
} |
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