app/@overflow/model/meta/MetaProbeStatus.ts

23 lines
425 B
TypeScript
Raw Normal View History

2018-08-26 15:15:10 +00:00
export interface MetaProbeStatus {
id?: number;
key?: string;
name?: string;
createDate?: Date;
}
export enum MetaProbeStatusEnum {
INITIAL = 'INITIAL',
NORMAL = 'NORMAL',
}
export const toMetaProbeStatusEnum = (v: MetaProbeStatus): MetaProbeStatusEnum => {
return MetaProbeStatusEnum[v.key];
};
export const toMetaProbeStatus = (v: MetaProbeStatusEnum): MetaProbeStatus => {
return {
key: v,
};
};