chore: models

This commit is contained in:
2025-08-07 21:34:01 +08:00
parent ee6c37f0ae
commit 1746334a8f
19 changed files with 474 additions and 0 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,33 @@
export interface BasicPageParams {
page: number
pageSize: number
}
export interface BasicFetchResult<T> {
items: T[]
total: number
}
export interface RemoteData {
key: string | number
data?: any
}
export interface PageParams<T> {
model: T
size: number
current: number
sort?: string
order?: string
extra?: any
}
export interface PageResult<T> {
records: T[]
// offset: number
pages: string
current: string
total: string
size: string
orders: any[]
}

View File

@@ -0,0 +1,8 @@
export type ReduceForUpdateVO =
| 'createdTime'
| 'createdBy'
| 'updatedTime'
| 'updatedBy'
| 'echoMap'
export type ReduceForSaveVO = ReduceForUpdateVO | 'id'
export type ReduceForPageQuery = ReduceForUpdateVO

View File

@@ -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;

View File

@@ -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<NdmIcmpLogVO>;
export type NdmIcmpLogSaveVO = Partial<Omit<NdmIcmpLogVO, ReduceForSaveVO>>;
export type NdmIcmpLogUpdateVO = Partial<Omit<NdmIcmpLogVO, ReduceForUpdateVO>>;
export type NdmIcmpLogPageVO = Partial<Omit<NdmIcmpLogVO, ReduceForPageQuery>>;

View File

@@ -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<NdmSnmpLogVO>;
export type NdmSnmpLogSaveVO = Partial<Omit<NdmSnmpLogVO, ReduceForSaveVO>>;
export type NdmSnmpLogUpdateVO = Partial<Omit<NdmSnmpLogVO, ReduceForUpdateVO>>;
export type NdmSnmpLogPageVO = Partial<Omit<NdmSnmpLogVO, ReduceForPageQuery>>;

View File

@@ -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<NdmSecurityBoxVO>;
export type NdmSecurityBoxSaveVO = Partial<Omit<NdmSecurityBoxVO, ReduceForSaveVO>>;
export type NdmSecurityBoxUpdateVO = Partial<Omit<NdmSecurityBoxVO, ReduceForUpdateVO>>;
export type NdmSecurityBoxPageVO = Partial<Omit<NdmSecurityBoxVO, ReduceForPageQuery>>;

View File

@@ -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<NdmSwitchVO>;
export type NdmSwitchSaveVO = Partial<Omit<NdmSwitchVO, ReduceForSaveVO>>;
export type NdmSwitchUpdateVO = Partial<Omit<NdmSwitchVO, ReduceForUpdateVO>>;
export type NdmSwitchPageVO = Partial<Omit<NdmSwitchVO, ReduceForPageQuery>>;

View File

@@ -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<NdmNvrVO>;
export type NdmNvrSaveVO = Partial<Omit<NdmNvrVO, ReduceForSaveVO>>;
export type NdmNvrUpdateVO = Partial<Omit<NdmNvrVO, ReduceForUpdateVO>>;
export type NdmNvrPageVO = Partial<Omit<NdmNvrVO, ReduceForPageQuery>>;

View File

@@ -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<NdmCameraVO>;
export type NdmCameraSaveVO = Partial<Omit<NdmCameraVO, ReduceForSaveVO>>;
export type NdmCameraUpdateVO = Partial<Omit<NdmCameraVO, ReduceForUpdateVO>>;
export type NdmCameraPageVO = Partial<Omit<NdmCameraVO, ReduceForPageQuery>>;

View File

@@ -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<NdmDecoderVO>;
export type NdmDecoderSaveVO = Partial<Omit<NdmDecoderVO, ReduceForSaveVO>>;
export type NdmDecoderUpdateVO = Partial<Omit<NdmDecoderVO, ReduceForUpdateVO>>;
export type NdmDecoderPageVO = Partial<Omit<NdmDecoderVO, ReduceForPageQuery>>;

View File

@@ -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<NdmKeyboardVO>;
export type NdmKeyboardSaveVO = Partial<Omit<NdmKeyboardVO, ReduceForSaveVO>>;
export type NdmKeyboardUpdateVO = Partial<Omit<NdmKeyboardVO, ReduceForUpdateVO>>;
export type NdmKeyboardPageVO = Partial<Omit<NdmKeyboardVO, ReduceForPageQuery>>;

View File

@@ -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<NdmMediaServerVO>;
export type NdmMediaServerSaveVO = Partial<Omit<NdmMediaServerVO, ReduceForSaveVO>>;
export type NdmMediaServerUpdateVO = Partial<Omit<NdmMediaServerVO, ReduceForUpdateVO>>;
export type NdmMediaServerPageVO = Partial<Omit<NdmMediaServerVO, ReduceForPageQuery>>;

View File

@@ -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<NdmVideoServerVO>;
export type NdmVideoServerSaveVO = Partial<Omit<NdmVideoServerVO, ReduceForSaveVO>>;
export type NdmVideoServerUpdateVO = Partial<Omit<NdmVideoServerVO, ReduceForUpdateVO>>;
export type NdmVideoServerPageVO = Partial<Omit<NdmVideoServerVO, ReduceForPageQuery>>;

View File

@@ -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<DefParameterVO>;
export type DefParameterSaveVO = Partial<Omit<DefParameterVO, ReduceForSaveVO>>;
export type DefParameterUpdateVO = Partial<Omit<DefParameterVO, ReduceForUpdateVO>>;
export type DefParameterPageVO = Partial<Omit<DefParameterVO, ReduceForPageQuery>>;

View File

@@ -0,0 +1 @@
export * from './def-parameter';

View File

@@ -0,0 +1,2 @@
export * from './login-params';
export * from './login-result';

View File

@@ -0,0 +1,8 @@
export interface LoginParams {
username: string;
password: string;
code: string;
key: string;
grantType: 'PASSWORD' | 'CAPTCHA' | 'REFRESH_TOKEN';
refreshToken?: string;
}

View File

@@ -0,0 +1,8 @@
export interface LoginResult {
tenantId: string;
uuid: string;
token: string;
refreshToken: string;
expire: string;
expiration: string;
}