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

export enum MetaServiceTypeEnum {
  UNKNOWN = 'UNKNOWN',
  Network = 'NETWORK',
  Monitoring = 'MONITORING',
  Directory = 'DIRECTORY',
  Database = 'DATABASE',
  NoSQL = 'NOSQL',
  Mail = 'MAIL',
  Search = 'SEARCH',
  Web = 'WEB',
  WAS = 'WAS',
}

export const toMetaServiceTypeEnum = (v: MetaServiceType): MetaServiceTypeEnum => {
  return MetaServiceTypeEnum[v.key];
};

export const toMetaServiceType = (v: MetaServiceTypeEnum): MetaServiceType => {
  return {
    key: v,
  };
};
