Add Tag table
This commit is contained in:
parent
589c36fa48
commit
4ff9e53527
12
api/src/tables/Tags.kt
Normal file
12
api/src/tables/Tags.kt
Normal file
@ -0,0 +1,12 @@
|
||||
package be.vandewalleh.tables
|
||||
|
||||
import be.vandewalleh.entities.Tag
|
||||
import me.liuwj.ktorm.schema.Table
|
||||
import me.liuwj.ktorm.schema.int
|
||||
import me.liuwj.ktorm.schema.varchar
|
||||
|
||||
object Tags : Table<Tag>("Tags") {
|
||||
val id by int("id").primaryKey().bindTo { it.id }
|
||||
val name by varchar("name").bindTo { it.name }
|
||||
val noteId by int("note_id").references(Notes) { it.note }
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user