export interface MetaHistoryType {
  id?: number;
  key?: string;
  name?: string;
  createDate?: Date;
}

export enum MetaHistoryTypeEnum {
  MEMBER = 'MEMBER',
  PROBE = 'PROBE',
  DISCOVERY = 'DISCOVERY',
  TARGET = 'TARGET',
  CRAWLER = 'CRAWLER',
  SENSOR = 'SENSOR',
}

export const toMetaHistoryTypeEnum = (v: MetaHistoryType): MetaHistoryTypeEnum => {
  return MetaHistoryTypeEnum[v.key];
};

export const toMetaHistoryType = (v: MetaHistoryTypeEnum): MetaHistoryType => {
  return {
    key: v,
  };
};
