package com.correx.core.approvals

import com.correx.core.approvals.model.ApprovalState
import com.correx.core.events.events.StoredEvent
import com.correx.core.sessions.projections.Projection

class ApprovalProjector(private val reducer: ApprovalReducer) : Projection<ApprovalState> {
    override fun initial(): ApprovalState = ApprovalState()
    override fun apply(state: ApprovalState, event: StoredEvent): ApprovalState = reducer.reduce(state, event)
}
