Created
May 4, 2020 10:36
-
-
Save simonmorley/52279222ca700e224636661fe6aa3859 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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