Skip to content

Commit

Permalink
preapred productsUpdated event
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoudAA committed Nov 26, 2024
1 parent b36d4bf commit 4bdce03
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.ecommerce.domain.events;

import org.ecommerce.domain.Product;

public class ProductsUpdated extends Event {
private final Product product;

public ProductsUpdated(Product product) {
super("productsUpdated", "Product", product.getId().toString());
this.product = product;
}

public Product getProduct() {
return product;
}

@Override
public String toString() {
return "ProductsUpdated{" +
"product=" + product +
", eventType=" + getEventType() +
", aggregateType=" + getAggregateType() +
", aggregateId=" + getAggregateId() +
'}';
}
}

0 comments on commit 4bdce03

Please sign in to comment.