package inn.ocsf.bee.freigeld.core.model

import org.apache.commons.codec.digest.DigestUtils
import java.util.*

data class PersonIdentityPrivateMember(val personId: UUID, val position: PersonMemberPosition) : PersonIdentity {

    override fun getKey(): String {
        return "${personId}/${position}"
    }
}

data class PersonIdentityFullName(val fullName: String) : PersonIdentity {

    override fun getKey(): String {
        return DigestUtils.sha512Hex(fullName)
    }
}

data class PersonIdentitySecret(val secret: String, val codes: List<String>?) : PersonIdentity {

    override fun getKey(): String {
        return secret
    }

}