Created
August 13, 2020 17:55
-
-
Save beyondxscratch/ae2fc64802d788222b8c48c2090d78d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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