Skip to content

Instantly share code, notes, and snippets.

@simonmorley
Created May 4, 2020 10:36
Show Gist options
  • Save simonmorley/52279222ca700e224636661fe6aa3859 to your computer and use it in GitHub Desktop.
Save simonmorley/52279222ca700e224636661fe6aa3859 to your computer and use it in GitHub Desktop.
package org.simon.webapp
import org.jetbrains.exposed.sql.Table
data class User(
val id: Int?,
val name: String,
val age: Int?,
val email: String
)
object Users: Table() {
val id = integer("id").autoIncrement()
val name = varchar("name", length = 50) // Column<String>
val age = integer(name="age")
val email = varchar("email", 255)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment