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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'modelCode',
    label: '数据模型编码'
  },
  {
    field: 'ruleId',
    label: '规则id'
  },
  {
    field: 'srcCol',
    label: '源列名'
  },
  {
    field: 'srcColType',
    label: '源列类型'
  },
  {
    field: 'mappingName',
    label: '映射目标列名称）'
  },
  {
    field: 'mappingCol',
    label: '映射目标列'
  },
  {
    field: 'mappingColType',
    label: '映射目标列类型'
  },
  {
    field: 'mappingColNum',
    label: '映射目标列列号'
  },
  {
    field: 'remarks',
    label: '注释字段'
  },
  {
    field: 'primarykey',
    label: '组成联合主键'
  },
  {
    field: 'primaryKeyNum',
    label: '主键排序'
  },
  {
    field: 'uuid',
    label: '标识是否为uuid'
  }
])

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

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