fix: rename field

This commit is contained in:
2025-12-08 12:31:14 +07:00
parent 14d9859611
commit ceb06474dd
3 changed files with 30 additions and 30 deletions
+6 -6
View File
@@ -2,13 +2,13 @@ import { omit } from 'lodash-es'
import { httpConfig } from '~/config'
interface DeviceStatus {
floor: string
unit: string
device: string
room: string
devType: string
floorName: string
unitNumber: string
deviceName: string
roomName: string
deviceType: string
code: string
tower: string
towerNumber: string
payload: string
topics?: unknown
createAt?: unknown
+18 -18
View File
@@ -6,13 +6,13 @@ export default abstract class QueryService {
status: 'success'
message: 'command accepted'
data: {
floor: string
unit: string
device: string
room: string
devType: string
floorName: string
unitNumber: string
deviceName: string
roomName: string
deviceType: string
code: string
tower: string
towerNumber: string
payload: string
}
} | null> {
@@ -25,13 +25,13 @@ export default abstract class QueryService {
status: 'success',
message: 'command accepted',
data: {
floor: 'L2',
unit: '01',
device: 'BL',
room: 'LV',
devType: 'S',
floorName: 'L2',
unitNumber: '01',
deviceName: 'BL',
roomName: 'LV',
deviceType: 'S',
code: 'S',
tower: 'T1',
towerNumber: 'T1',
payload: 'Open',
},
}
@@ -42,13 +42,13 @@ export default abstract class QueryService {
status: 'success',
message: 'command accepted',
data: {
floor: 'L2',
unit: '01',
device: 'L',
room: 'LV',
devType: 'S',
floorName: 'L2',
unitNumber: '01',
deviceName: 'L',
roomName: 'LV',
deviceType: 'S',
code: 'C',
tower: 'T1',
towerNumber: 'T1',
payload: 'On',
},
}
+6 -6
View File
@@ -70,13 +70,13 @@ export const deviceQueryResponseSchema = {
status: z.literal('success'),
message: z.literal('command accepted'),
data: z.object({
floor: z.string(),
unit: z.string(),
device: z.string(),
room: z.string(),
devType: z.string(),
floorName: z.string(),
unitNumber: z.string(),
deviceName: z.string(),
roomName: z.string(),
deviceType: z.string(),
code: z.string(),
tower: z.string(),
towerNumber: z.string(),
payload: z.string(),
}),
}),