Skip to content

Instantly share code, notes, and snippets.

@romainbsl
Last active June 20, 2020 13:06
Show Gist options
  • Save romainbsl/371d4976306e046d24a60b6675483a3e to your computer and use it in GitHub Desktop.
Save romainbsl/371d4976306e046d24a60b6675483a3e to your computer and use it in GitHub Desktop.
/**
* Simple token auth to avoid flood on my backend API
*/
data class Token(val token: String) {
fun bearer() = "Bearer $token"
}
/**
* Who's voting?
*/
data class Participant(
val firstname: String,
val lastname: String,
val vote: Vote? = null)
/**
* What are your prognostics?
*/
data class Vote(
val name: String,
val sex: Sex,
val weight: Double,
val size: Int,
val dateOfBirth: String)
enum class Sex { BOY, GIRL }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment