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

export enum MetaIPTypeEnum {
  V4 = 'V4',
  V6 = 'V6',
}

export const toMetaIPTypeEnum = (v: MetaIPType): MetaIPTypeEnum => {
  return MetaIPTypeEnum[v.key];
};

export const toMetaIPType = (v: MetaIPTypeEnum): MetaIPType => {
  return {
    key: v,
  };
};
