import { h } from 'vue';
import { BasicColumn } from '@/components/Table';
import { roleTypeNames } from './types';

export const columns: BasicColumn[] = [
  {
    label: '角色id',
    prop: 'roleId',
  },
  {
    label: '角色类型',
    prop: 'roleType',
    render(record) {
      return h(
        'span',
        {},
        {
          default: () => roleTypeNames[record.row.roleType],
        },
      );
    },
  },
  {
    label: '角色编码',
    prop: 'roleCode',
  },
  {
    label: '角色名称',
    prop: 'roleName',
  },
  {
    label: '备注',
    prop: 'remark',
  },
  {
    label: '创建时间',
    prop: 'createTime',
  },
];
