Profile.kt 410 Bytes
Newer Older
Julien Topçu's avatar
Julien Topçu committed
1
package org.craftsrecords.talkadvisor.infra.resources
Julien Topçu's avatar
Julien Topçu committed
2
3
4
5
6

import org.springframework.hateoas.Identifiable
import org.craftsrecords.talkadvisor.recommendation.profile.Profile as DomainProfile

data class Profile(private val id: String, val preferences: Preferences) : Identifiable<String> {
7
    override fun getId() = id
Julien Topçu's avatar
Julien Topçu committed
8
9
10
}

fun DomainProfile.toResource(): Profile = Profile(this.id, this.preferences.toResource())