import React from 'react';
import { Card, Table, Button, Tag } from 'antd';
import { PlusOutlined } from '@ant-design/icons';

const CampaignPlan = () => {
  const columns = [
    {
      title: '计划名称',
      dataIndex: 'name',
      key: 'name',
    },
    {
      title: '开始时间',
      dataIndex: 'startTime',
      key: 'startTime',
    },
    {
      title: '结束时间',
      dataIndex: 'endTime',
      key: 'endTime',
    },
    {
      title: '状态',
      dataIndex: 'status',
      key: 'status',
      render: status => (
        <Tag color={status === '进行中' ? 'green' : 'default'}>
          {status}
        </Tag>
      ),
    },
  ];

  return (
    <Card
      title="活动计划"
      extra={
        <Button type="primary" icon={<PlusOutlined />}>
          新增计划
        </Button>
      }
    >
      <Table columns={columns} dataSource={[]} rowKey="id" />
    </Card>
  );
};

export default CampaignPlan;