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

export enum MetaHostTypeEnum {
  Host = 'HOST',
  NAS = 'NAS',
  Printer = 'PRINTER',
  Router = 'ROUTER',
}

export const toMetaHostTypeEnum = (v: MetaHostType): MetaHostTypeEnum => {
  return MetaHostTypeEnum[v.key];
};

export const toMetaHostType = (v: MetaHostTypeEnum): MetaHostType => {
  return {
    key: v,
  };
};
