app/@overflow/model/meta/MetaTargetStatus.ts
crusader aaf3e23966 ing
2018-08-27 00:15:10 +09:00

24 lines
455 B
TypeScript

export interface MetaTargetStatus {
id?: number;
key?: string;
name?: string;
createDate?: Date;
}
export enum MetaTargetStatusEnum {
UP = 'UP',
DOWN = 'DOWN',
WARN = 'WARN',
ERROR = 'ERROR',
}
export const toMetaTargetStatusEnum = (v: MetaTargetStatus): MetaTargetStatusEnum => {
return MetaTargetStatusEnum[v.key];
};
export const toMetaTargetStatus = (v: MetaTargetStatusEnum): MetaTargetStatus => {
return {
key: v,
};
};