Profile.kt 439 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
7
8
9
10
11
12

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> {
    override fun getId(): String {
        return id
    }
}

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