fix: correct walkthrough field names in demo seed
This commit is contained in:
parent
981a8eded4
commit
f02f0dfe72
1 changed files with 8 additions and 11 deletions
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue