Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for generation of marker types #14

Closed
ahjohannessen opened this issue Mar 26, 2015 · 0 comments
Closed

Support for generation of marker types #14

ahjohannessen opened this issue Mar 26, 2015 · 0 comments

Comments

@ahjohannessen
Copy link
Contributor

Hi, I wondered if it is possible to generate classes that extend existing (marker) traits? An example:

// General marker for all domain events
trait DomainEvent {
  def persistenceId: String
  def correlationId: UUID
  ...
}

// Specific customer events in a specific package
// Optimally it should be sealed, but that does probably 
// not work because of code gen.

trait CustomerEvent extends DomainEvent { 
  def customerId: ...
  ...
}

// Result of code generation from corresponding .proto files
case class CustomerPolicyChanged(...) extends CustomerEvent
case class CustomerStatusUpgraded(...) extends CustomerEvent
...
nadavsr added a commit that referenced this issue Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant