import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '站点id',
    align:"center",
    dataIndex: 'siteId'
   },
   {
    title: '同步状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '站点id',
    field: 'siteId',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
//子表表格配置
export const okkiLinkedinMarketingDataDetailColumns: JVxeColumn[] = [
    {
      title: '文章id',
      key: 'articleId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '标题',
      key: 'title',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '链接',
      key: 'url',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '创建日期',
      key: 'createTime',
      type: JVxeTypes.datetime,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]

// 高级查询数据
export const superQuerySchema = {
  siteId: {title: '站点id',order: 0,view: 'text', type: 'string',},
  status: {title: '同步状态',order: 1,view: 'number', type: 'number',},
  createTime: {title: '创建日期',order: 2,view: 'datetime', type: 'string',},
  //子表高级查询
  okkiLinkedinMarketingDataDetail: {
    title: 'Linkedin营销效果数据详情',
    view: 'table',
    fields: {
        articleId: {title: '文章id',order: 0,view: 'text', type: 'string',},
        title: {title: '标题',order: 1,view: 'text', type: 'string',},
        url: {title: '链接',order: 2,view: 'text', type: 'string',},
        createTime: {title: '创建日期',order: 3,view: 'datetime', type: 'string',},
    }
  },
};
