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' import { httpConfig } from '~/config'
interface DeviceStatus { interface DeviceStatus {
floor: string floorName: string
unit: string unitNumber: string
device: string deviceName: string
room: string roomName: string
devType: string deviceType: string
code: string code: string
tower: string towerNumber: string
payload: string payload: string
topics?: unknown topics?: unknown
createAt?: unknown createAt?: unknown
+18 -18
View File
@@ -6,13 +6,13 @@ export default abstract class QueryService {
status: 'success' status: 'success'
message: 'command accepted' message: 'command accepted'
data: { data: {
floor: string floorName: string
unit: string unitNumber: string
device: string deviceName: string
room: string roomName: string
devType: string deviceType: string
code: string code: string
tower: string towerNumber: string
payload: string payload: string
} }
} | null> { } | null> {
@@ -25,13 +25,13 @@ export default abstract class QueryService {
status: 'success', status: 'success',
message: 'command accepted', message: 'command accepted',
data: { data: {
floor: 'L2', floorName: 'L2',
unit: '01', unitNumber: '01',
device: 'BL', deviceName: 'BL',
room: 'LV', roomName: 'LV',
devType: 'S', deviceType: 'S',
code: 'S', code: 'S',
tower: 'T1', towerNumber: 'T1',
payload: 'Open', payload: 'Open',
}, },
} }
@@ -42,13 +42,13 @@ export default abstract class QueryService {
status: 'success', status: 'success',
message: 'command accepted', message: 'command accepted',
data: { data: {
floor: 'L2', floorName: 'L2',
unit: '01', unitNumber: '01',
device: 'L', deviceName: 'L',
room: 'LV', roomName: 'LV',
devType: 'S', deviceType: 'S',
code: 'C', code: 'C',
tower: 'T1', towerNumber: 'T1',
payload: 'On', payload: 'On',
}, },
} }
+6 -6
View File
@@ -70,13 +70,13 @@ export const deviceQueryResponseSchema = {
status: z.literal('success'), status: z.literal('success'),
message: z.literal('command accepted'), message: z.literal('command accepted'),
data: z.object({ data: z.object({
floor: z.string(), floorName: z.string(),
unit: z.string(), unitNumber: z.string(),
device: z.string(), deviceName: z.string(),
room: z.string(), roomName: z.string(),
devType: z.string(), deviceType: z.string(),
code: z.string(), code: z.string(),
tower: z.string(), towerNumber: z.string(),
payload: z.string(), payload: z.string(),
}), }),
}), }),