From d14e290990d375b96ad32b66a6974b018012fb01 Mon Sep 17 00:00:00 2001 From: yangsy Date: Sun, 17 Aug 2025 01:44:14 +0800 Subject: [PATCH] feat: enums --- src/enums/device-type.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/enums/device-type.ts b/src/enums/device-type.ts index fbe7e77..a54c91f 100644 --- a/src/enums/device-type.ts +++ b/src/enums/device-type.ts @@ -1,23 +1,24 @@ export const DeviceType = { Camera: '132', - Decoder: '114', - Keyboard: '141', - MediaServer: '403', Nvr: '118', - SecurityBox: '222', Switch: '220', + Decoder: '114', + SecurityBox: '222', + MediaServer: '403', VideoServer: '401', + Keyboard: '141', } as const; -export type DeviceTypeCode = keyof typeof DeviceType; +export type DeviceTypeKey = keyof typeof DeviceType; +export type DeviceTypeCode = (typeof DeviceType)[DeviceTypeKey]; export const DeviceTypeName = { [DeviceType.Camera]: '摄像机', - [DeviceType.Decoder]: '解码器', - [DeviceType.Keyboard]: '网络键盘', - [DeviceType.MediaServer]: '媒体服务器', [DeviceType.Nvr]: '网络录像机', - [DeviceType.SecurityBox]: '智能安防箱', [DeviceType.Switch]: '交换机', + [DeviceType.Decoder]: '解码器', + [DeviceType.SecurityBox]: '智能安防箱', + [DeviceType.MediaServer]: '媒体服务器', [DeviceType.VideoServer]: '视频服务器', + [DeviceType.Keyboard]: '网络键盘', };