com.lightningkite.lightningdb.HasIdFields.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
package com.lightningkite.lightningdb
import kotlin.reflect.KProperty1
@Suppress("UNCHECKED_CAST")
object HasIdFields {
fun , ID: Comparable> _id() = HasId::_id as KProperty1
}
@Suppress("UNCHECKED_CAST")
object HasEmailFields {
fun email() = HasEmail::email as KProperty1
}
@Suppress("UNCHECKED_CAST")
object HasPhoneNumberFields {
fun phoneNumber() = HasPhoneNumber::phoneNumber as KProperty1
}
@Suppress("UNCHECKED_CAST")
object HasMaybeEmailFields {
fun email() = HasMaybeEmail::email as KProperty1
}
@Suppress("UNCHECKED_CAST")
object HasMaybePhoneNumberFields {
fun phoneNumber() = HasMaybePhoneNumber::phoneNumber as KProperty1
}
@Suppress("UNCHECKED_CAST")
object HasPasswordFields {
fun hashedPassword() = HasPassword::hashedPassword as KProperty1
}