diff --git a/src/apis/models/base/model.ts b/src/apis/models/base/model.ts new file mode 100644 index 0000000..15ae811 --- /dev/null +++ b/src/apis/models/base/model.ts @@ -0,0 +1,18 @@ +export interface SuperModel { + id: string + createdBy: string + createdTime: string + echoMap?: any +} + +export interface BaseModel extends SuperModel { + updatedBy: string + updatedTime: string +} + +export interface TreeModel extends BaseModel { + parentId: string + sortValue: number + treeGrade: number + treePath: string +} diff --git a/src/apis/models/base/page.ts b/src/apis/models/base/page.ts new file mode 100644 index 0000000..8c064c1 --- /dev/null +++ b/src/apis/models/base/page.ts @@ -0,0 +1,33 @@ +export interface BasicPageParams { + page: number + pageSize: number +} + +export interface BasicFetchResult { + items: T[] + total: number +} + +export interface RemoteData { + key: string | number + data?: any +} + +export interface PageParams { + model: T + size: number + current: number + sort?: string + order?: string + extra?: any +} + +export interface PageResult { + records: T[] + // offset: number + pages: string + current: string + total: string + size: string + orders: any[] +} diff --git a/src/apis/models/base/reduce.ts b/src/apis/models/base/reduce.ts new file mode 100644 index 0000000..7258b33 --- /dev/null +++ b/src/apis/models/base/reduce.ts @@ -0,0 +1,8 @@ +export type ReduceForUpdateVO = + | 'createdTime' + | 'createdBy' + | 'updatedTime' + | 'updatedBy' + | 'echoMap' +export type ReduceForSaveVO = ReduceForUpdateVO | 'id' +export type ReduceForPageQuery = ReduceForUpdateVO diff --git a/src/apis/models/devices/index.ts b/src/apis/models/devices/index.ts new file mode 100644 index 0000000..285b264 --- /dev/null +++ b/src/apis/models/devices/index.ts @@ -0,0 +1,26 @@ +import type { NdmSecurityBoxVO } from './other/ndm-security-box'; +import type { NdmSwitchVO } from './other/ndm-switch'; +import type { NdmNvrVO } from './storage/ndm-nvr'; +import type { NdmCameraVO } from './video/ndm-camera'; +import type { NdmDecoderVO } from './video/ndm-decoder'; +import type { NdmKeyboardVO } from './video/ndm-keyboard'; +import type { NdmMediaServerVO } from './video/ndm-media-server'; +import type { NdmVideoServerVO } from './video/ndm-video-server'; + +export * from './log/ndm-icmp-log'; +export * from './log/ndm-snmp-log'; + +export * from './other/ndm-security-box'; +export * from './other/ndm-switch'; + +export * from './storage/ndm-nvr'; + +export * from './video/ndm-camera'; +export * from './video/ndm-decoder'; +export * from './video/ndm-keyboard'; +export * from './video/ndm-media-server'; +export * from './video/ndm-video-server'; + +export type NdmDeviceVO = NdmSecurityBoxVO | NdmSwitchVO | NdmNvrVO | NdmCameraVO | NdmDecoderVO | NdmKeyboardVO | NdmMediaServerVO | NdmVideoServerVO; + +export type NdmServerVO = NdmMediaServerVO | NdmVideoServerVO; diff --git a/src/apis/models/devices/log/ndm-icmp-log.ts b/src/apis/models/devices/log/ndm-icmp-log.ts new file mode 100644 index 0000000..863c787 --- /dev/null +++ b/src/apis/models/devices/log/ndm-icmp-log.ts @@ -0,0 +1,17 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmIcmpLogVO extends BaseModel { + deviceId: string; + name: string; + ipAddress: string; + deviceStatus: string; +} + +export type NdmIcmpLogResultVO = Partial; + +export type NdmIcmpLogSaveVO = Partial>; + +export type NdmIcmpLogUpdateVO = Partial>; + +export type NdmIcmpLogPageVO = Partial>; diff --git a/src/apis/models/devices/log/ndm-snmp-log.ts b/src/apis/models/devices/log/ndm-snmp-log.ts new file mode 100644 index 0000000..8c07407 --- /dev/null +++ b/src/apis/models/devices/log/ndm-snmp-log.ts @@ -0,0 +1,18 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmSnmpLogVO extends BaseModel { + deviceId: string; + name: string; + ipAddress: string; + diagInfo: string; + deviceType: string; +} + +export type NdmSnmpLogResultVO = Partial; + +export type NdmSnmpLogSaveVO = Partial>; + +export type NdmSnmpLogUpdateVO = Partial>; + +export type NdmSnmpLogPageVO = Partial>; diff --git a/src/apis/models/devices/other/ndm-security-box.ts b/src/apis/models/devices/other/ndm-security-box.ts new file mode 100644 index 0000000..39ad33d --- /dev/null +++ b/src/apis/models/devices/other/ndm-security-box.ts @@ -0,0 +1,35 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmSecurityBoxVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmSecurityBoxResultVO = Partial; + +export type NdmSecurityBoxSaveVO = Partial>; + +export type NdmSecurityBoxUpdateVO = Partial>; + +export type NdmSecurityBoxPageVO = Partial>; diff --git a/src/apis/models/devices/other/ndm-switch.ts b/src/apis/models/devices/other/ndm-switch.ts new file mode 100644 index 0000000..21a51b0 --- /dev/null +++ b/src/apis/models/devices/other/ndm-switch.ts @@ -0,0 +1,35 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmSwitchVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmSwitchResultVO = Partial; + +export type NdmSwitchSaveVO = Partial>; + +export type NdmSwitchUpdateVO = Partial>; + +export type NdmSwitchPageVO = Partial>; diff --git a/src/apis/models/devices/storage/ndm-nvr.ts b/src/apis/models/devices/storage/ndm-nvr.ts new file mode 100644 index 0000000..1511d01 --- /dev/null +++ b/src/apis/models/devices/storage/ndm-nvr.ts @@ -0,0 +1,46 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmNvrVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + gbCode: string; + gbPort: number; + gbDomain: string; + gb28181Enabled: boolean; + onvifPort: number; + onvifUsername: string; + onvifPassword: string; + onvifMajorIndex: number; + onvifMinorIndex: number; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; + recordCheckEnabled: boolean; + clusterList: string; +} + +export type NdmNvrResultVO = Partial; + +export type NdmNvrSaveVO = Partial>; + +export type NdmNvrUpdateVO = Partial>; + +export type NdmNvrPageVO = Partial>; diff --git a/src/apis/models/devices/video/ndm-camera.ts b/src/apis/models/devices/video/ndm-camera.ts new file mode 100644 index 0000000..4db83d2 --- /dev/null +++ b/src/apis/models/devices/video/ndm-camera.ts @@ -0,0 +1,45 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmCameraVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + gbCode: string; + gbPort: number; + gbDomain: string; + gb28181Enabled: boolean; + onvifPort: number; + onvifUsername: string; + onvifPassword: string; + onvifMajorIndex: number; + onvifMinorIndex: number; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + cameraType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmCameraResultVO = Partial; + +export type NdmCameraSaveVO = Partial>; + +export type NdmCameraUpdateVO = Partial>; + +export type NdmCameraPageVO = Partial>; diff --git a/src/apis/models/devices/video/ndm-decoder.ts b/src/apis/models/devices/video/ndm-decoder.ts new file mode 100644 index 0000000..927acd4 --- /dev/null +++ b/src/apis/models/devices/video/ndm-decoder.ts @@ -0,0 +1,42 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmDecoderVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + gbCode: string; + gbPort: number; + gbDomain: string; + gb28181Enabled: boolean; + onvifPort: number; + onvifUsername: string; + onvifPassword: string; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmDecoderResultVO = Partial; + +export type NdmDecoderSaveVO = Partial>; + +export type NdmDecoderUpdateVO = Partial>; + +export type NdmDecoderPageVO = Partial>; diff --git a/src/apis/models/devices/video/ndm-keyboard.ts b/src/apis/models/devices/video/ndm-keyboard.ts new file mode 100644 index 0000000..2c28590 --- /dev/null +++ b/src/apis/models/devices/video/ndm-keyboard.ts @@ -0,0 +1,36 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmKeyboardVO extends BaseModel { + + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmKeyboardResultVO = Partial; + +export type NdmKeyboardSaveVO = Partial>; + +export type NdmKeyboardUpdateVO = Partial>; + +export type NdmKeyboardPageVO = Partial>; diff --git a/src/apis/models/devices/video/ndm-media-server.ts b/src/apis/models/devices/video/ndm-media-server.ts new file mode 100644 index 0000000..c02a2d0 --- /dev/null +++ b/src/apis/models/devices/video/ndm-media-server.ts @@ -0,0 +1,39 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmMediaServerVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + gbCode: string; + gbPort: number; + gbDomain: string; + gb28181Enabled: boolean; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmMediaServerResultVO = Partial; + +export type NdmMediaServerSaveVO = Partial>; + +export type NdmMediaServerUpdateVO = Partial>; + +export type NdmMediaServerPageVO = Partial>; diff --git a/src/apis/models/devices/video/ndm-video-server.ts b/src/apis/models/devices/video/ndm-video-server.ts new file mode 100644 index 0000000..edb4665 --- /dev/null +++ b/src/apis/models/devices/video/ndm-video-server.ts @@ -0,0 +1,39 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmVideoServerVO extends BaseModel { + deviceId: string; + name: string; + manufacturer: string; + state: boolean; + model: string; + ipAddress: string; + manageUrl: string; + manageUsername: string; + managePassword: string; + gbCode: string; + gbPort: number; + gbDomain: string; + gb28181Enabled: boolean; + diagFlag: string; + diagParam: string; + diagFormat: string; + lastDiagInfo: string; + lastDiagTime: string; + icmpEnabled: boolean; + description: string; + deviceStatus: string; + deviceType: string; + community: string; + frontendConfig: string; + linkDescription: string; + snmpEnabled: boolean; +} + +export type NdmVideoServerResultVO = Partial; + +export type NdmVideoServerSaveVO = Partial>; + +export type NdmVideoServerUpdateVO = Partial>; + +export type NdmVideoServerPageVO = Partial>; diff --git a/src/apis/models/system/def-parameter.ts b/src/apis/models/system/def-parameter.ts new file mode 100644 index 0000000..dada8f4 --- /dev/null +++ b/src/apis/models/system/def-parameter.ts @@ -0,0 +1,18 @@ +import type { BaseModel } from '../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../base/reduce'; + +export interface DefParameterVO extends BaseModel { + key: string; + value: string; + name: string; + remarks: string; + paramType: string; +} + +export type DefParameterResultVO = Partial; + +export type DefParameterSaveVO = Partial>; + +export type DefParameterUpdateVO = Partial>; + +export type DefParameterPageVO = Partial>; diff --git a/src/apis/models/system/index.ts b/src/apis/models/system/index.ts new file mode 100644 index 0000000..28a74a0 --- /dev/null +++ b/src/apis/models/system/index.ts @@ -0,0 +1 @@ +export * from './def-parameter'; diff --git a/src/apis/models/user/index.ts b/src/apis/models/user/index.ts new file mode 100644 index 0000000..4accf30 --- /dev/null +++ b/src/apis/models/user/index.ts @@ -0,0 +1,2 @@ +export * from './login-params'; +export * from './login-result'; diff --git a/src/apis/models/user/login-params.ts b/src/apis/models/user/login-params.ts new file mode 100644 index 0000000..822f283 --- /dev/null +++ b/src/apis/models/user/login-params.ts @@ -0,0 +1,8 @@ +export interface LoginParams { + username: string; + password: string; + code: string; + key: string; + grantType: 'PASSWORD' | 'CAPTCHA' | 'REFRESH_TOKEN'; + refreshToken?: string; +} diff --git a/src/apis/models/user/login-result.ts b/src/apis/models/user/login-result.ts new file mode 100644 index 0000000..08ffe74 --- /dev/null +++ b/src/apis/models/user/login-result.ts @@ -0,0 +1,8 @@ +export interface LoginResult { + tenantId: string; + uuid: string; + token: string; + refreshToken: string; + expire: string; + expiration: string; +}