Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package org.craftsrecords.talkadvisor.infra.resources
import org.springframework.hateoas.Identifiable
import java.util.*
import org.craftsrecords.talkadvisor.recommendation.Recommendation as DomainRecommendation
import org.craftsrecords.talkadvisor.recommendation.talk.Talk as DomainTalk
class Recommendation(private val id: UUID, val talks: List<Talk>) : Identifiable<UUID> {
override fun getId() = id
}
fun DomainRecommendation.toResource() = Recommendation(id = id, talks = talks.map(DomainTalk::toResource).toList())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.