/**
 * @description: 搜索配置
 */
export const buttons = [
  { label: '添加', type: 'primary', key: 'add', auth: 'currency_createCurrency' },
  { label: '编辑', type: 'primary', key: 'edit', auth: 'currency_editCurrency' },
  { label: '删除', type: 'danger', key: 'delete', auth: 'currency_delCurrency' },
]
export const tableColumns = [
  { prop: 'name', label: '币名' },
  { prop: 'symbol', label: '货币符号' },
  { prop: 'rate', label: '汇率' },
  { prop: 'typeStr', label: '货币类型' },
  { prop: 'statusStr', label: '状态' },
  { prop: 'created_at', label: '创建时间' },
]

export const form = [
  { prop: 'name', label: '币名', type: 'input', placeholder: '请输入币名' },
  { prop: 'symbol', label: '货币符号', type: 'input', placeholder: '请输入货币符号' },
  { prop: 'rate', label: '汇率', type: 'number', placeholder: '请输入汇率' },
  { prop: 'type', label: '货币类型', type: 'radio', placeholder: '请输入货币类型' },
  { prop: 'status', label: '状态', type: 'radio', placeholder: '请输入状态' },
]

export const rules = {
  name: [{ required: true, message: '请输入币名', trigger: ['change'] }],
  symbol: [{ required: true, message: '请输入货币符号', trigger: ['change'] }],
  rate: [{ required: true, message: '请输入汇率', trigger: ['change'] }],
  type: [{ required: true, message: '请输入货币类型', trigger: ['change'] }],
  status: [{ required: true, message: '请输入状态', trigger: ['change'] }],
}