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

25 lines
486 B
TypeScript
Raw Normal View History

2018-08-26 15:15:10 +00:00
export interface MetaMemberStatus {
id?: number;
key?: string;
name?: string;
createDate?: Date;
}
export enum MetaMemberStatusEnum {
NOAUTH = 'NOAUTH',
NORMAL = 'NORMAL',
DORMANCY = 'DORMANCY',
WITHDRAWAL = 'WITHDRAWAL',
}
export const toMetaMemberStatusEnum = (v: MetaMemberStatus): MetaMemberStatusEnum => {
return MetaMemberStatusEnum[v.key];
};
export const toMetaMemberStatus = (v: MetaMemberStatusEnum): MetaMemberStatus => {
return {
key: v,
};
};