import { $t } from '#/locales';

/**
 * 列
 */
const columns = [
  // {
  //   title: $t('robot.fee.robotUuid'),
  //   dataIndex: 'robotUuid',
  //  
  // },
  {
    title: $t('robot.fee.robotAccount'),
    dataIndex: 'robotAccount',
   
  },
  {
    title: $t('robot.fee.groupName'),
    dataIndex: 'groupName',
   
  },
  {
    title: $t('robot.fee.totalAmount'),
    dataIndex: 'totalAmount',
   
  },
  {
    title: $t('robot.fee.usedAmount'),
    dataIndex: 'usedAmount',
  },
    {
    title: $t('robot.fee.applyAmount'),
    dataIndex: 'applyAmount',
  },
  {
    title: $t('robot.fee.notes'),
    dataIndex: 'notes',
   
  },
  {
    title: $t('robot.fee.status'),
    dataIndex: 'status',
   
  },
  {
    title: $t('robot.fee.validStartTime'),
    dataIndex: 'validStartTime',
   
    sorter: true,
  },
  {
    title: $t('robot.fee.validEndTime'),
    dataIndex: 'validEndTime',
   
    sorter: true,
  },
  {
    title: $t('robot.fee.createTime'),
    dataIndex: 'createTime',
   
    sorter: true,
  },
  {
    title: $t('robot.fee.creator'),
    dataIndex: 'creator',
   
  },
  {
    title: $t('common.action'),
    dataIndex: 'action',
    fixed: 'right',
    width: 160
  }
]

/**
 * 状态映射
 */
const statusMap = {
  0: $t('robot.fee.statusOptions.v0'),
  1: $t('robot.fee.statusOptions.v1'),
}

/**
 * 查询参数
 */
const query = {
  robotUuid: '',
  robotAccount: '',
  groupUuid: undefined,
  notes: '',
  status: undefined,
  creator: ''
};

export const d = {
  isShowQuery: true,
  loading: false,
  pagination: {
    total: 0,
    current: 1,
    pageSize: 10,
    showTotal: (total, range) => `共 ${total} 条`,
    showSizeChanger: true,
    pageSizeOptions: ['10', '20', '50', '100', '500', '1000'],
    showQuickJumper: true,
  },
  datas: [],
  query,
  columns,
  statusMap,
}