Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Move generic portfolio command/event to higher level
Browse files Browse the repository at this point in the history
Move generic portfolio command/event to higher level
  • Loading branch information
smcvb committed Jun 1, 2018
1 parent 41f7810 commit f7f1228
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 90 deletions.

This file was deleted.

This file was deleted.

@@ -1,12 +1,10 @@
package org.axonframework.samples.trader.api.portfolio.cash

import org.axonframework.commandhandling.TargetAggregateIdentifier
import org.axonframework.samples.trader.api.orders.transaction.TransactionId
import org.axonframework.samples.trader.api.portfolio.PortfolioCommand
import org.axonframework.samples.trader.api.portfolio.PortfolioId
import javax.validation.constraints.Min

abstract class PortfolioCommand(@TargetAggregateIdentifier open val portfolioId: PortfolioId)

data class CancelCashReservationCommand(
override val portfolioId: PortfolioId,
val transactionId: TransactionId,
Expand Down
@@ -1,9 +1,8 @@
package org.axonframework.samples.trader.api.portfolio.cash

import org.axonframework.samples.trader.api.orders.trades.PortfolioId
import org.axonframework.samples.trader.api.orders.transaction.TransactionId

abstract class PortfolioEvent(open val portfolioId: PortfolioId)
import org.axonframework.samples.trader.api.portfolio.PortfolioEvent
import org.axonframework.samples.trader.api.portfolio.PortfolioId

data class CashDepositedEvent(
override val portfolioId: PortfolioId,
Expand Down
@@ -0,0 +1,11 @@
package org.axonframework.samples.trader.api.portfolio

import org.axonframework.commandhandling.TargetAggregateIdentifier
import org.axonframework.samples.trader.api.users.UserId

abstract class PortfolioCommand(@TargetAggregateIdentifier open val portfolioId: PortfolioId)

data class CreatePortfolioCommand(
override val portfolioId: PortfolioId,
val userId: UserId
) : PortfolioCommand(portfolioId)
@@ -0,0 +1,10 @@
package org.axonframework.samples.trader.api.portfolio

import org.axonframework.samples.trader.api.users.UserId

abstract class PortfolioEvent(open val portfolioId: PortfolioId)

class PortfolioCreatedEvent(
override val portfolioId: PortfolioId,
val userId: UserId
) : PortfolioEvent(portfolioId)

0 comments on commit f7f1228

Please sign in to comment.