diff --git a/src/main/kotlin/com/wyattjmiller/data/RecipeEntities.kt b/src/main/kotlin/com/wyattjmiller/data/RecipeEntities.kt new file mode 100644 index 0000000..63ec764 --- /dev/null +++ b/src/main/kotlin/com/wyattjmiller/data/RecipeEntities.kt @@ -0,0 +1,22 @@ +package com.wyattjmiller.data + +import org.ktorm.entity.Entity +import org.ktorm.schema.Table +import org.ktorm.schema.int +import org.ktorm.schema.varchar + +object DbRecipeTable : Table("recipe") { + val id = int("id").primaryKey().bindTo { it.id } + val name = varchar("name").bindTo { it.name } + val desc = varchar("description").bindTo { it.desc } + val ingredients = varchar("ingredients").bindTo { it.ingredients } +} + +interface DbRecipeEntity : Entity { + companion object : Entity.Factory() + + val id: Int + val name: String + val desc: String + val ingredients: String +} \ No newline at end of file