You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
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)
}