import { TableProps } from "antd"
import React from "react"
import moment from "moment"

const columns = (): TableProps<any>['columns'] => [
    {
        title: '流量包名称',
        dataIndex: 'unionPackageName',
        key: 'unionPackageName',
        ellipsis: true,
        width: 180,
        render: (value) => {
            return <span style={{ fontSize: "12px", cursor: 'pointer' }}>{value}</span>
        }
    },
    {
        title: '流量包ID',
        dataIndex: 'unionPackageId',
        key: 'unionPackageId',
        ellipsis: true,
        width: 120,
        align: 'center',
        render: (value) => {
            return <span style={{ fontSize: "12px", cursor: 'pointer' }}>{value}</span>
        }
    },
    {
        title: '最后更新时间',
        dataIndex: 'lastModifiedTime',
        key: 'lastModifiedTime',
        ellipsis: true,
        render: (value) => {
            return <span style={{ fontSize: "12px", cursor: 'pointer' }}>{moment(value * 1000).format('YYYY-MM-DD')}</span>
        }
    },
]

export default columns