export const fieldNumberFormats = [{
    value: "AUTO",
    label: "自动"
  },
  {
    value: "INTEGER",
    label: "整型"
  },
  {
    value: "RETAIN1",
    label: "保留一位小数"
  },
  {
    value: "RETAIN2",
    label: "保留两位小数"
  },
  {
    value: "PERCENT",
    label: "百分比"
  },
  {
    value: "PERCENT1",
    label: "百分比一位小数"
  },
  {
    value: "PERCENT2",
    label: "百分比两位小数"
  },{
    value: "CUSTOM",
    label: "自定义公式"
  },
]
export const defaultFieldExtJson = {
  numberDataFormatOperator: "1",
  numberDataFormatNum: 100,
  numberDataFormatToFixed: 2,
  hidden: false,
}
export const fieldAggregates = [{
    value: "SUM",
    label: "求和"
  },
  {
    value: "COUNT",
    label: "计数"
  },
  {
    value: "COUNT_UNIQ",
    label: "计数(去重)"
  },
  {
    value: "MAX",
    label: "最大值"
  },
  {
    value: "MIN",
    label: "最小值"
  },
  {
    value: "AVG",
    label: "平均值"
  },
]
export const fieldDateFormats = [{
    value: "yyyy",
    label: "yyyy"
  },
  {
    value: "yyyyMM",
    label: "yyyyMM"
  },
  {
    value: "yyyy_MM",
    label: "yyyy-MM"
  },
  {
    value: "yyyy$MM",
    label: "yyyy/MM"
  },
  {
    value: "yyyyMMdd",
    label: "yyyyMMdd"
  },
  {
    value: "yyyy_MM_dd",
    label: "yyyy-MM-dd"
  },
  {
    value: "yyyy$MM$dd",
    label: "yyyy/MM/dd"
  },
  {
    value: "yyyyMMddhh$mm$ss",
    label: "yyyyMMdd hh:mm:ss"
  },
  {
    value: "yyyy_MM_ddhh$mm$ss",
    label: "yyyy-MM-dd hh:mm:ss"
  },
  {
    value: "yyyy$MM$ddhh$mm$ss",
    label: "yyyy/MM/dd hh:mm:ss"
  },
  {
    value: "hh",
    label: "hh"
  },
  {
    value: "hh$mm",
    label: "hh:mm"
  },
  {
    value: "hh$mm$ss",
    label: "hh:mm:ss"
  },
]
export const dateTypeMap = {
  yyyy: "year",
  yyyyMM: "month",
  yyyy_MM: "month",
  yyyy$MM: "month",
  yyyyMMdd: "date",
  yyyy_MM_dd: "date",
  yyyy$MM$dd: "date",
  yyyyMMddhh$mm$ss: "time",
  yyyy_MM_ddhh$mm$ss: "time",
  yyyy$MM$ddhh$mm$ss: "time",
  hh: "hour",
  hh$mm: "minute",
  hh$mm$ss: "second",
}
export const timeTypeMap = {
  yyyy: "年",
  yyyyMM: "月",
  yyyy_MM: "月",
  yyyy$MM: "月",
  yyyyMMdd: "日",
  yyyy_MM_dd: "日",
  yyyy$MM$dd: "日",
  yyyyMMddhh$mm$ss: "秒",
  yyyy_MM_ddhh$mm$ss: "秒",
  yyyy$MM$ddhh$mm$ss: "秒",
  hh: "时",
  hh$mm: "分",
  hh$mm$ss: "秒",
}
export const timeAppendMap = {
  "year": '年',
  "month": '月',
  "date": '日',
  "time": '秒',
  "hour": '时',
  "minute": '分',
  "second": '秒',
}
export const columnKeys = [
  "aggregationType",
  "columnAttr",
  "columnComment",
  "columnName",
  "columnSql",
  "columnTitle",
  "cubeColumnId",
  "dimensionType",
  "numberDataFormat",
  "extJson",
  "tableAliasName",
  "tableName",
  "timeDataFormat",
  "viewDataType",
  "oldViewDataType",
  "type",
  'zuan'
]
export const functions = {
  NUMBER: [{
      function: "eq",
      label: "等于"
    },
    {
      function: "ne",
      label: "不等于"
    },
    {
      function: "lt",
      label: "小于"
    },
    {
      function: "le",
      label: "小于等于"
    },
    {
      function: "gt",
      label: "大于"
    },
    {
      function: "ge",
      label: "大于等于"
    },
  ],
  STRING: [{
      function: "eq",
      label: "精准匹配"
    },
    {
      function: "rightLike",
      label: "开头匹配"
    },
    {
      function: "leftLike",
      label: "结尾匹配"
    },
    {
      function: "like",
      label: "匹配"
    },
    {
      function: "notLike",
      label: "不匹配"
    },
    {
      function: "in",
      label: "包含"
    },
    {
      function: "notIn",
      label: "不包含"
    },
  ],
  DATETIME: [{
      function: "eq",
      label: "等于"
    },
    {
      function: "ge",
      label: "开始于"
    },
    {
      function: "le",
      label: "结束于"
    },
  ],
}

export const globalFunctions = {
  NUMBER: [{
      function: "eq",
      label: "等于"
    },
    {
      function: "between",
      label: "区间"
    },
  ],
  STRING: [{
      function: "like",
      label: "匹配"
    },
    {
      function: "in",
      label: "包含"
    },
  ],
  DATETIME: [{
    function: "between",
    label: "区间"
  }, ],
}
