15 lines
492 B
Scala
15 lines
492 B
Scala
|
|
package lu.foyer
|
||
|
|
package contracts
|
||
|
|
|
||
|
|
import zio.*
|
||
|
|
|
||
|
|
class ContractController(
|
||
|
|
val commandEngine: CommandEngine[ContractCommand, ContractEvent, ContractState])
|
||
|
|
extends CommandEngineController[ContractCommand, ContractEvent, ContractState]:
|
||
|
|
override val onthology = "org:example:insurance:contract"
|
||
|
|
override val entityName = "contracts"
|
||
|
|
override val allEntities = List("clients", "contracts")
|
||
|
|
|
||
|
|
object ContractController:
|
||
|
|
val layer = ZLayer.fromFunction(ContractController.apply)
|