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
|
// Map Pulse sensor device 11666 to Flower Room
|
||||||
if (flowerRoom) {
|
if (flowerRoom) {
|
||||||
const existingSensor = await prisma.sensor.findFirst({
|
const existingSensor = await prisma.sensor.findFirst({
|
||||||
where: { externalId: '11666', type: 'VPD' }
|
where: { deviceId: '11666', type: 'VPD' }
|
||||||
});
|
});
|
||||||
if (!existingSensor) {
|
if (!existingSensor) {
|
||||||
await prisma.sensor.create({
|
await prisma.sensor.create({
|
||||||
data: {
|
data: {
|
||||||
name: 'Veridian Demo Pulse',
|
name: 'Veridian Demo Pulse',
|
||||||
type: 'VPD',
|
type: 'VPD',
|
||||||
externalId: '11666',
|
deviceId: '11666',
|
||||||
location: 'Flower Room',
|
location: 'Flower Room',
|
||||||
status: 'ACTIVE',
|
isActive: true,
|
||||||
roomId: flowerRoom.id
|
roomId: flowerRoom.id
|
||||||
} as any
|
} as any
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue