export interface MeasuringDeviceUnit {
  id?: string | number;
  parameterName?: string;
  measuringUnit?: string;
  standardUnit?: string;
  standardUnitName?: string;
  conversionFactor?: number | null;
  dataRatio?: number | null;
}

export interface MeasuringDeviceVO {
  id: string | number;
  deviceId?: string;
  deviceName?: string;
  deviceCode?: string;
  installPosition?: string | number;
  installPositionName?: string;
  collectingDeviceId?: string | number;
  collectingDeviceName?: string;
  deviceType?: string | number;
  isDeviceGroup?: string;
  parentDeviceGroupId?: string | number;
  parentDeviceGroupName?: string;
  childDevices?: MeasuringDeviceVO[];
  children?: MeasuringDeviceVO[];
  measuringUnit?: string;
  standardUnit?: string;
  standardUnitName?: string;
  conversionFactor?: number;
  dataRatio?: number;
  units?: MeasuringDeviceUnit[];
  specificationModel?: string;
  manufacturer?: string;
  factoryNo?: string;
  accuracyLevel?: string;
  measureRange?: string;
  communicationProtocol?: string;
  communicationAddress?: string;
  collectionCycle?: string;
  lastCollectionTime?: string;
  alarmRules?: Array<{
    id: string | number;
    ruleName?: string;
    alarmType?: string;
    alarmLevel?: string;
    enabled?: string;
  }>;
  alarmRuleNames?: string;
  status?: string;
  lastVerificationDate?: string;
  responsibleDept?: string;
  responsiblePerson?: string;
  remark?: string;
  createTime?: string;
  updateTime?: string;
}

export interface MeasuringDeviceQuery extends PageQuery {
  keyword?: string;
  deviceId?: string;
  deviceName?: string;
  deviceCode?: string;
  installPosition?: string | number;
  deviceType?: string | number;
  isDeviceGroup?: string;
  parentDeviceGroupId?: string | number;
}

export type MeasuringDeviceForm = Partial<MeasuringDeviceVO>;
