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

export enum MetaInputTypeEnum {
  TEXT = 'TEXT',
  PASSWORD = 'PASSWORD',
  NUMBER = 'NUMBER',
  BOOLEAN = 'BOOLEAN',
  SELECT = 'SELECT',
}

export const toMetaInputTypeEnum = (v: MetaInputType): MetaInputTypeEnum => {
  return MetaInputTypeEnum[v.key];
};

export const toMetaInputType = (v: MetaInputTypeEnum): MetaInputType => {
  return {
    key: v,
  };
};
