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


export enum MetaPortTypeEnum {
  TCP = 'TCP',
  UDP = 'UDP',
}

export const toMetaPortTypeEnum = (v: MetaPortType): MetaPortTypeEnum => {
  return MetaPortTypeEnum[v.key];
};

export const toMetaPortType = (v: MetaPortTypeEnum): MetaPortType => {
  return {
    key: v,
  };
};
