All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cccev.s2.framework.api.FrameworkAggregateService.kt Maven / Gradle / Ivy

The newest version!
package cccev.s2.framework.api

import cccev.s2.framework.api.entity.FrameworkAutomateExecutor
import cccev.s2.framework.domain.FrameworkAggregate
import cccev.s2.framework.domain.command.FrameworkCreateCommand
import cccev.s2.framework.domain.command.FrameworkCreatedEvent
import java.util.UUID
import org.springframework.stereotype.Service

@Service
class FrameworkAggregateService(
    private val automate: FrameworkAutomateExecutor
): FrameworkAggregate {
    override suspend fun create(command: FrameworkCreateCommand) = automate.init(command) {
        FrameworkCreatedEvent(
            id = UUID.randomUUID().toString(),
            identifier = command.identifier,
            name = command.name
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy