feat: Add demo Room records for Dashboard display

Adds 6 cultivation zones to seed.ts:
- Flower Room A/B (78°F, 55% RH)
- Veg Room 1/2 (76°F, 65% RH)
- Drying Room (62°F, 60% RH)
- Cure Vault (65°F, 58% RH)

These rooms are now returned by /api/rooms for Dashboard display.
This commit is contained in:
fullsizemalt 2026-01-13 00:05:06 -08:00
parent eca58ecbc2
commit 5fe22f03fb

View file

@ -78,6 +78,24 @@ async function main() {
console.log('Updated Owner password hash'); console.log('Updated Owner password hash');
} }
// Create Demo Rooms for Dashboard
const demoRooms = [
{ name: 'Flower Room A', type: RoomType.FLOWER, sqft: 500, targetTemp: 78, targetHumidity: 55, capacity: 100 },
{ name: 'Flower Room B', type: RoomType.FLOWER, sqft: 500, targetTemp: 78, targetHumidity: 55, capacity: 100 },
{ name: 'Veg Room 1', type: RoomType.VEG, sqft: 300, targetTemp: 76, targetHumidity: 65, capacity: 200 },
{ name: 'Veg Room 2', type: RoomType.VEG, sqft: 300, targetTemp: 76, targetHumidity: 65, capacity: 200 },
{ name: 'Drying Room', type: RoomType.DRY, sqft: 150, targetTemp: 62, targetHumidity: 60, capacity: 50 },
{ name: 'Cure Vault', type: RoomType.CURE, sqft: 200, targetTemp: 65, targetHumidity: 58, capacity: 100 }
];
for (const r of demoRooms) {
const existingRoom = await prisma.room.findFirst({ where: { name: r.name } });
if (!existingRoom) {
await prisma.room.create({ data: r });
console.log(`Created Room: ${r.name}`);
}
}
// Create Default Supplies // Create Default Supplies
const supplies = [ const supplies = [
{ {