import moment from "moment"
import React from "react"

let columns = () => [
    {
        title: '广告主名称',
        dataIndex: 'mpName',
        key: 'mpName',
        align: 'center',
        width: 90,
        fixed: 'left'
    },
    {
        title: 'APPID',
        dataIndex: 'mpAppId',
        key: 'mpAppId',
        align: 'center',
        width: 170
    },
    {
        title: '账号ID',
        dataIndex: 'accountId',
        key: 'accountId',
        align: 'center',
        width: 110
    },
    {
        title: '投手',
        dataIndex: 'putUserName',
        key: 'putUserName',
        align: 'center',
        width: 90
    },
    {
        title: '类型',
        dataIndex: 'sourceType',
        key: 'sourceType',
        align: 'center',
        width: 95,
        render: (a: number, b: any) => (
            <span>{a === 0 ? '微信' : 'QQ'}</span>
        )
    },
    {
        title: '授权时间',
        dataIndex: 'authTime',
        key: 'authTime',
        align: 'center',
        width: 180,
        render: (a: string, b: any) => (
            <span>{moment(a).format('yyyy-MM-DD HH:mm:ss')}</span>
        )
    },
    {
        title: '是否有效',
        dataIndex: 'status',
        key: 'status',
        align: 'center',
        width: 180,
        render: (a: number, b: any) => (
            <span>{a === 1 ? '账号已失效，请主动删除' : '有效'}</span>
        )
    },
    {
        title: '主体名称',
        dataIndex: 'corporationName',
        key: 'corporationName',
        width: 340,
    },
    
]

export default columns