fix: Use correct Sensor field names in seed.ts (deviceId, isActive)
This commit is contained in:
parent
210cd16bbe
commit
3fc1f6cc4e
1 changed files with 3 additions and 3 deletions
|
|
@ -384,16 +384,16 @@ async function main() {
|
|||
// Map Pulse sensor device 11666 to Flower Room
|
||||
if (flowerRoom) {
|
||||
const existingSensor = await prisma.sensor.findFirst({
|
||||
where: { externalId: '11666', type: 'VPD' }
|
||||
where: { deviceId: '11666', type: 'VPD' }
|
||||
});
|
||||
if (!existingSensor) {
|
||||
await prisma.sensor.create({
|
||||
data: {
|
||||
name: 'Veridian Demo Pulse',
|
||||
type: 'VPD',
|
||||
externalId: '11666',
|
||||
deviceId: '11666',
|
||||
location: 'Flower Room',
|
||||
status: 'ACTIVE',
|
||||
isActive: true,
|
||||
roomId: flowerRoom.id
|
||||
} as any
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue