From f02f0dfe72ba9adee5b6c621b54dd7a1d90b538f Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Fri, 12 Dec 2025 20:15:26 -0800 Subject: [PATCH] fix: correct walkthrough field names in demo seed --- backend/prisma/seed-demo.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/backend/prisma/seed-demo.js b/backend/prisma/seed-demo.js index bf2cc89..125e5b4 100644 --- a/backend/prisma/seed-demo.js +++ b/backend/prisma/seed-demo.js @@ -149,20 +149,17 @@ async function main() { console.log('\nšŸ“ Creating Walkthrough History...'); for (let d = 0; d < 30; d++) { const user = userList[Math.floor(Math.random() * userList.length)]; + const startTime = daysAgo(d); + const endTime = new Date(startTime); + endTime.setMinutes(endTime.getMinutes() + 30 + Math.floor(Math.random() * 30)); + const walkthrough = await prisma.dailyWalkthrough.create({ data: { - userId: user.id, + completedBy: user.id, status: 'COMPLETED', - startedAt: daysAgo(d), - completedAt: daysAgo(d), - notes: d === 0 ? null : [ - 'All rooms looking good', - 'Found spider mites in Flower A, treated with Pyganic', - 'VPD running high, adjusted humidity', - 'Reservoir topped off', - 'Noticed some cal-mag deficiency in veg', - null - ][Math.floor(Math.random() * 6)] + date: daysAgo(d), + startTime, + endTime } });