Skip to content

Commit

Permalink
add event bus project
Browse files Browse the repository at this point in the history
  • Loading branch information
hquangthien committed Jun 4, 2021
1 parent f937387 commit d3a4e37
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace EventBus.Messages.Common
{
public class EventBusConstants
{
public const string BasketCheckoutQueue = "basketcheckout-queue";
}
}
7 changes: 7 additions & 0 deletions src/BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

</Project>
24 changes: 24 additions & 0 deletions src/BuildingBlocks/EventBus.Messages/Events/BasketCheckoutEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace EventBus.Messages.Events
{
public class BasketCheckoutEvent : IntegrationBaseEvent
{
public string UserName { get; set; }
public decimal TotalPrice { get; set; }

// BillingAddress
public string FirstName { get; set; }
public string LastName { get; set; }
public string EmailAddress { get; set; }
public string AddressLine { get; set; }
public string Country { get; set; }
public string State { get; set; }
public string ZipCode { get; set; }

// Payment
public string CardName { get; set; }
public string CardNumber { get; set; }
public string Expiration { get; set; }
public string CVV { get; set; }
public int PaymentMethod { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

namespace EventBus.Messages.Events
{
public class IntegrationBaseEvent
{
public IntegrationBaseEvent()
{
Id = Guid.NewGuid();
CreationDate = DateTime.UtcNow;
}

public IntegrationBaseEvent(Guid id, DateTime creationDate)
{
Id = id;
CreationDate = creationDate;
}

public Guid Id { get; private set; }
public DateTime CreationDate { get; set; }
}
}
9 changes: 9 additions & 0 deletions src/OwlShop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Application", "Ser
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Infrastructure", "Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{B8436B8B-537E-4E31-8EAD-1673140E764E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildingBlocks", "BuildingBlocks", "{3F87CC3A-0E1A-4D83-80CF-FA8E6210C684}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBus.Messages", "BuildingBlocks\EventBus.Messages\EventBus.Messages.csproj", "{1EF71E8E-2444-477D-B62B-9A0A17EFD250}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -45,6 +49,7 @@ Global
{CD042F25-9876-4E58-9832-406655E2B7C7} = {2778B37E-B9B7-4B21-8FFF-EBAAD79C201B}
{C9783EA5-2BE2-4B93-8232-7732EB1FC7EF} = {2778B37E-B9B7-4B21-8FFF-EBAAD79C201B}
{B8436B8B-537E-4E31-8EAD-1673140E764E} = {2778B37E-B9B7-4B21-8FFF-EBAAD79C201B}
{1EF71E8E-2444-477D-B62B-9A0A17EFD250} = {3F87CC3A-0E1A-4D83-80CF-FA8E6210C684}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{59FD3275-96E9-4BF5-A776-C75B865ED867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -79,5 +84,9 @@ Global
{B8436B8B-537E-4E31-8EAD-1673140E764E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8436B8B-537E-4E31-8EAD-1673140E764E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8436B8B-537E-4E31-8EAD-1673140E764E}.Release|Any CPU.Build.0 = Release|Any CPU
{1EF71E8E-2444-477D-B62B-9A0A17EFD250}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EF71E8E-2444-477D-B62B-9A0A17EFD250}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EF71E8E-2444-477D-B62B-9A0A17EFD250}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EF71E8E-2444-477D-B62B-9A0A17EFD250}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

0 comments on commit d3a4e37

Please sign in to comment.