File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 44require_relative "stores/events"
55require_relative "stores/registration"
66require_relative "stores/naming"
7+ require_relative "stores/product_registration"
78
89module Stores
910
1011 class Configuration
1112 def call ( event_store , command_bus )
1213 command_bus . register ( RegisterStore , Registration . new ( event_store ) )
1314 command_bus . register ( NameStore , Naming . new ( event_store ) )
15+ command_bus . register ( RegisterProduct , ProductRegistration . new ( event_store ) )
1416 end
1517 end
1618end
Original file line number Diff line number Diff line change @@ -7,4 +7,9 @@ class NameStore < Infra::Command
77 attribute :store_id , Infra ::Types ::UUID
88 attribute :name , Infra ::Types . Instance ( StoreName )
99 end
10+
11+ class RegisterProduct < Infra ::Command
12+ attribute :store_id , Infra ::Types ::UUID
13+ attribute :product_id , Infra ::Types ::UUID
14+ end
1015end
Original file line number Diff line number Diff line change @@ -9,4 +9,9 @@ class StoreNamed < Infra::Event
99 attribute :name , Infra ::Types ::String
1010 end
1111
12+ class ProductRegistered < Infra ::Event
13+ attribute :store_id , Infra ::Types ::UUID
14+ attribute :product_id , Infra ::Types ::UUID
15+ end
16+
1217end
You can’t perform that action at this time.
0 commit comments