initial commit
This commit is contained in:
commit
d84861949f
92 files changed
+8425
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package net.keinekekse.app.books.db.schema
|
||||
|
||||
import net.keinekekse.app.books.model.ArtistRole
|
||||
import org.jetbrains.exposed.v1.core.dao.id.EntityID
|
||||
import org.jetbrains.exposed.v1.core.dao.id.IntIdTable
|
||||
import org.jetbrains.exposed.v1.dao.IntEntity
|
||||
import org.jetbrains.exposed.v1.dao.IntEntityClass
|
||||
|
||||
object ArtistRolesTable : IntIdTable("artist_roles") {
|
||||
var role = varchar("role", 50).index()
|
||||
}
|
||||
|
||||
class ArtistRoleDAO(id: EntityID<Int>) : IntEntity(id) {
|
||||
companion object : IntEntityClass<ArtistRoleDAO>(ArtistRolesTable)
|
||||
|
||||
var role by ArtistRolesTable.role
|
||||
}
|
||||
|
||||
fun artistToRoleDaoToModel(dao: ArtistRoleDAO) = ArtistRole(dao.id.value, dao.role)
|
||||
Reference in new issue
Block a user