return await db.insertInto('Recipe').values({
id: '342432', // how do i handle this autogenrating this from the DB?
updatedAt: new Date(), // how do i handle this autogenrating this from the DB?
name: input.name,
description: input.description,
ingredients: input.ingredients.split('\n'),
instructions: input.instructions.split('\n'),
prepTime: input.prepTime,
cookTime: input.cookTime,
totalTime: input.totalTime,
servings: input.servings,
}).executeTakeFirst()
return await db.insertInto('Recipe').values({
id: '342432', // how do i handle this autogenrating this from the DB?
updatedAt: new Date(), // how do i handle this autogenrating this from the DB?
name: input.name,
description: input.description,
ingredients: input.ingredients.split('\n'),
instructions: input.instructions.split('\n'),
prepTime: input.prepTime,
cookTime: input.cookTime,
totalTime: input.totalTime,
servings: input.servings,
}).executeTakeFirst()