diff --git a/backend/prisma/seed-demo.js b/backend/prisma/seed-demo.js index ecffda9..bf2cc89 100644 --- a/backend/prisma/seed-demo.js +++ b/backend/prisma/seed-demo.js @@ -109,7 +109,8 @@ async function main() { // ==================== TOUCH POINTS (Activity History) ==================== console.log('\nšŸ“‹ Creating Touch Point History...'); - const touchPointTypes = ['WATER', 'FEED', 'INSPECT', 'DEFOLIATE', 'TOP', 'TRANSPLANT', 'IPM']; + // Must match TouchType enum: WATER, FEED, PRUNE, TRAIN, INSPECT, IPM, TRANSPLANT, HARVEST, OTHER + const touchPointTypes = ['WATER', 'FEED', 'INSPECT', 'PRUNE', 'TRAIN', 'TRANSPLANT', 'IPM']; const userList = Object.values(users); for (const batch of Object.values(batches)) { @@ -125,8 +126,8 @@ async function main() { WATER: ['Standard feed', 'Light watering', 'Heavy watering - dry pots', 'pH 6.2'], FEED: ['Week 3 flower nutes', 'Veg formula A+B', 'Full strength', 'Half strength flush'], INSPECT: ['Looking healthy', 'Minor yellowing on lower leaves', 'Strong growth', 'Ready for transplant', 'Trichomes cloudy'], - DEFOLIATE: ['Removed lower fan leaves', 'Light lollipop', 'Heavy defoliation day 21'], - TOP: ['Topped to 4 nodes', 'FIMed'], + PRUNE: ['Removed lower fan leaves', 'Light lollipop', 'Heavy defoliation day 21'], + TRAIN: ['Topped to 4 nodes', 'FIMed', 'LST adjustment', 'Supercrop main stem'], TRANSPLANT: ['1gal to 3gal', '3gal to 5gal'], IPM: ['Pyganic spray', 'Neem foliar', 'Beneficial insects released', 'Dr Zymes application'], }; @@ -134,7 +135,7 @@ async function main() { await prisma.plantTouchPoint.create({ data: { batchId: batch.id, - userId: user.id, + createdBy: user.id, type, notes: notes[type][Math.floor(Math.random() * notes[type].length)], createdAt: daysAgo(daysBack)