Add User table
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package be.vandewalleh.tables
|
||||
|
||||
import be.vandewalleh.entities.User
|
||||
import me.liuwj.ktorm.schema.Table
|
||||
import me.liuwj.ktorm.schema.datetime
|
||||
import me.liuwj.ktorm.schema.int
|
||||
import me.liuwj.ktorm.schema.varchar
|
||||
|
||||
object Users : Table<User>("Users") {
|
||||
val id by int("id").primaryKey().bindTo { it.id }
|
||||
val username by varchar("username").bindTo { it.username }
|
||||
val email by varchar("email").bindTo { it.email }
|
||||
val password by varchar("password").bindTo { it.password }
|
||||
val createdAt by datetime("created_at").bindTo { it.createdAt }
|
||||
val lastLogin by datetime("last_login").bindTo { it.lastLogin }
|
||||
}
|
||||
Reference in New Issue
Block a user