// Path: cqrs-lib/src/main/java/se/citerus/cqrs/bookstore/event/DomainEvent.java
// public abstract class DomainEvent<T extends GenericId> implements Serializable {
// 
//   public final T aggregateId;
//   public final int version;
//   public final long timestamp;
// 
//   protected DomainEvent(T aggregateId, int version, long timestamp) {
//     this.aggregateId = aggregateId;
//     this.version = version;
//     this.timestamp = timestamp;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     return EqualsBuilder.reflectionEquals(this, o);
//   }
// 
//   @Override
//   public int hashCode() {
//     return HashCodeBuilder.reflectionHashCode(this);
//   }
// 
//   @Override
//   public String toString() {
//     return ToStringBuilder.reflectionToString(this, SHORT_PREFIX_STYLE);
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/ProductId.java
// public class ProductId extends GenericId {
// 
//   public ProductId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static ProductId randomId() {
//     return new ProductId(UUID.randomUUID().toString());
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/publishercontract/PublisherContractId.java
// public class PublisherContractId extends GenericId {
// 
//   public PublisherContractId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static PublisherContractId randomId() {
//     return new PublisherContractId(UUID.randomUUID().toString());
//   }
// 
// }


import com.fasterxml.jackson.annotation.JsonProperty;
import se.citerus.cqrs.bookstore.event.DomainEvent;
import se.citerus.cqrs.bookstore.ordercontext.order.ProductId;
import se.citerus.cqrs.bookstore.ordercontext.publishercontract.PublisherContractId;
package se.citerus.cqrs.bookstore.ordercontext.publishercontract.event;


public class PurchaseRegisteredEvent extends DomainEvent<PublisherContractId> {

  public final ProductId productId;
  public final long purchaseAmount;
  public final long feeAmount;
  public final long accumulatedFee;

// Path: cqrs-lib/src/main/java/se/citerus/cqrs/bookstore/event/DomainEvent.java
// public abstract class DomainEvent<T extends GenericId> implements Serializable {
// 
//   public final T aggregateId;
//   public final int version;
//   public final long timestamp;
// 
//   protected DomainEvent(T aggregateId, int version, long timestamp) {
//     this.aggregateId = aggregateId;
//     this.version = version;
//     this.timestamp = timestamp;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     return EqualsBuilder.reflectionEquals(this, o);
//   }
// 
//   @Override
//   public int hashCode() {
//     return HashCodeBuilder.reflectionHashCode(this);
//   }
// 
//   @Override
//   public String toString() {
//     return ToStringBuilder.reflectionToString(this, SHORT_PREFIX_STYLE);
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/ProductId.java
// public class ProductId extends GenericId {
// 
//   public ProductId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static ProductId randomId() {
//     return new ProductId(UUID.randomUUID().toString());
//   }
// 
// }
// 
// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/publishercontract/PublisherContractId.java
// public class PublisherContractId extends GenericId {
// 
//   public PublisherContractId(@JsonProperty("id") String id) {
//     super(id);
//   }
// 
//   public static PublisherContractId randomId() {
//     return new PublisherContractId(UUID.randomUUID().toString());
//   }
// 
// }


// Path: order-context-parent/eventbus-contract/src/main/java/se/citerus/cqrs/bookstore/ordercontext/publishercontract/event/PurchaseRegisteredEvent.java
import com.fasterxml.jackson.annotation.JsonProperty;
import se.citerus.cqrs.bookstore.event.DomainEvent;
import se.citerus.cqrs.bookstore.ordercontext.order.ProductId;
import se.citerus.cqrs.bookstore.ordercontext.publishercontract.PublisherContractId;

package se.citerus.cqrs.bookstore.ordercontext.publishercontract.event;


public class PurchaseRegisteredEvent extends DomainEvent<PublisherContractId> {

  public final ProductId productId;
  public final long purchaseAmount;
  public final long feeAmount;
  public final long accumulatedFee;

  public PurchaseRegisteredEvent(@JsonProperty("aggregateId") PublisherContractId aggregateId,