encode

fun encode(model: AggregateModel<*>, event: Any): EventRecord

event as a record of model.