import { $t } from '@vben/locales';

// 表格列配置
export const columns = [
  {
    title: $t('robot.giftConfig.configName'),
    dataIndex: 'configName',
    key: 'configName',
    width: 120,
    fixed: 'left',
  },
  {
    title: $t('robot.giftConfig.notes'),
    dataIndex: 'notes',
    key: 'notes',
    width: 150,
  },
  {
    title: $t('robot.giftConfig.minWatchDuration'),
    dataIndex: 'minWatchDuration',
    key: 'minWatchDuration',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.maxWatchDuration'),
    dataIndex: 'maxWatchDuration',
    key: 'maxWatchDuration',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.minOnlineUsers'),
    dataIndex: 'minOnlineUsers',
    key: 'minOnlineUsers',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.maxOnlineUsers'),
    dataIndex: 'maxOnlineUsers',
    key: 'maxOnlineUsers',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.minAmount'),
    dataIndex: 'minAmount',
    key: 'minAmount',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.maxAmount'),
    dataIndex: 'maxAmount',
    key: 'maxAmount',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.dailyAnchonum'),
    dataIndex: 'dailyAnchonum',
    key: 'dailyAnchonum',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.giftBatchNum'),
    dataIndex: 'giftBatchNum',
    key: 'giftBatchNum',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.creator'),
    dataIndex: 'creator',
    key: 'creator',
    width: 100,
  },
  {
    title: $t('robot.giftConfig.createTime'),
    dataIndex: 'createTime',
    key: 'createTime',
    width: 150,
  },
  {
    title: $t('robot.giftConfig.updateTime'),
    dataIndex: 'updateTime',
    key: 'updateTime',
    width: 150,
  },
  {
    title: $t('common.action'),
    dataIndex: 'action',
    key: 'action',
    width: 120,
    fixed: 'right',
  },
];

// 查询参数
export const query = {
  configName: null,
  notes: null,
  minWatchDuration: null,
  maxWatchDuration: null,
  minOnlineUsers: null,
  maxOnlineUsers: null,
  minAmount: null,
  maxAmount: null,
  dailyAnchonum: null,
  giftBatchNum: null,
  creator: null,
};

// 页面状态数据
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: [],
  columns,
  query,
};