<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { TableData } from '@/api/dataset/RepStore/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'modelCode',
    label: '模型编码 '
  },
  {
    field: 'beginDate',
    label: '开始日期'
  },
  {
    field: 'endDate',
    label: '结束日期'
  },
  {
    field: 'dscode',
    label: '数据源'
  },
  {
    field: 'storeType',
    label: '规则类型'
  },
  {
    field: 'storeContent',
    label: '规则内容'
  },
  {
    field: 'storeOperateType',
    label: '操作类型'
  },
  {
    field: 'ruleId',
    label: '存储规则id'
  },
  {
    field: 'schema',
    label: '数据库用户'
  },
  {
    field: 'tableName',
    label: '表名'
  },
  {
    field: 'validateResultTable',
    label: '校验结果表的表名'
  },
  {
    field: 'dataRule',
    label: '数据规则'
  },
  {
    field: 'redscode',
    label: '备份数据源'
  }
])

defineProps({
  currentRow: {
    type: Object as PropType<TableData>,
    default: () => {}
  }
})
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>
