worm/src/test/kotlin/net/cijber/tests/worm/example/entity/User.kt
2019-12-06 17:48:07 +01:00

21 lines
No EOL
401 B
Kotlin

package net.cijber.tests.worm.example.entity
import net.cijber.worm.dsl.Columns.uuid
import net.cijber.worm.dsl.Entity
import net.cijber.worm.dsl.Helper
import java.util.*
class User : Entity<User>() {
companion object : Helper<User>()
var id by uuid()
.default { UUID.randomUUID() }
}
fun main() {
val user = User {
id = UUID.randomUUID()
}
println(user.id)
}