import { FormSchema } from '/@/components/Table';

export const formSchema: FormSchema[] = [
  {
    required: true,
    field: 'type',
    label: '类型',
    component: 'Select',
    defaultValue: 'DEFAULT',
    colProps: { span: 24 },
    componentProps: {
      placeholder: '请选择类型',
      options: [{ label: '默认', value: 'DEFAULT' }],
    },
  },
  {
    field: 'maxDevices',
    required: true,

    label: '最大设备数（0-无限制）',
    component: 'InputNumber',
    defaultValue: '0',
    colProps: { span: 12 },
    componentProps: {
      placeholder: '请输入最大设备数（请输入数字）',
    },
  },
  {
    field: 'maxAssets',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '最大资产数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大资产（请输入数字）',
    },
  },
  {
    field: 'maxCustomers',
    required: true,
    defaultValue: '0',

    label: '最大客户数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大客户数（请输入数字）',
    },
  },
  {
    field: 'maxUsers',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '最大用户数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大用户数（请输入数字）',
    },
  },
  {
    field: 'maxDashboards',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '仪表板的最大数量（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入仪表板的最大数量（请输入数字）',
    },
  },
  {
    field: 'maxRuleChains',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '最大规则链数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大规则链数（请输入数字）',
    },
  },
  {
    field: 'maxResourcesInBytes',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '以字节为单位的资源文件的最大总和（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入（请输入数字）',
    },
  },
  {
    field: 'maxOtaPackagesInBytes',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: 'Ota包文件大小的最大总和（字节）（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入（请输入数字）',
    },
  },
  {
    field: 'maxTransportMessages',
    required: true,
    defaultValue: '0',

    label: '最大传输消息数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大传输消息数（请输入数字）',
    },
  },
  {
    field: 'maxTransportDataPoints',
    required: true,
    defaultValue: '0',

    label: '传输数据点的最大数量（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入传输数据点的最大数量（请输入数字）',
    },
  },
  {
    field: 'maxREExecutions',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '最大规则引擎数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大规则引擎数（请输入数字）',
    },
  },

  {
    field: 'maxJSExecutions',
    required: true,
    defaultValue: '0',

    label: '最大JavaScript执行数（0-不受限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大JavaScript执行数（请输入数字）',
    },
  },
  {
    field: 'maxDPStorageDays',
    required: true,
    defaultValue: '0',

    label: '最大日存储数据点数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入最大日存储数据点数（请输入数字）',
    },
  },
  {
    field: 'defaultStorageTtlDays',
    required: true,
    defaultValue: '0',

    label: '默认存储天数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入默认存储天数（请输入数字）',
    },
  },
  {
    field: 'alarmsTtlDays',
    required: true,
    defaultValue: '0',

    label: '告警存储天数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入告警存储天数（请输入数字）',
    },
  },
  {
    field: 'rpcTtlDays',
    required: true,
    defaultValue: '0',

    label: 'RPC存储天数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入RPC存储天数（请输入数字）',
    },
  },
  {
    ifShow: false,
    field: 'maxRuleNodeExecutionsPerMessage',
    required: true,
    defaultValue: '0',
    label: '每条消息的最大规则节点执行数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入每条消息的最大规则节点执行数（请输入数字）',
    },
  },
  {
    field: 'maxEmails',
    required: true,
    label: '发送的最大电子邮件数（0-无限制）',
    colProps: { span: 12 },
    defaultValue: '0',
    ifShow: false,
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入发送的最大电子邮件数（请输入数字）',
    },
  },
  {
    field: 'maxSms',
    required: true,
    defaultValue: '0',
    ifShow: false,
    label: '发送的最大短信数（0-无限制）',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入发送的最大短信数（请输入数字）',
    },
  },
  {
    field: 'maxCreatedAlarms',
    required: true,
    defaultValue: '0',

    label: '创建的最大报警数 (0 - 无限制)',
    colProps: { span: 12 },
    component: 'InputNumber',
    componentProps: {
      placeholder: '请输入maxCreatedAlarms（请输入数字）',
    },
  },
  {
    field: 'transportTenantMsgRateLimit',

    label: '传输租户消息速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入传输租户消息速率限制',
    },
  },
  {
    field: 'transportTenantTelemetryMsgRateLimit',
    label: '租户遥测消息速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入租户遥测消息速率限制',
    },
  },
  {
    field: 'transportTenantTelemetryDataPointsRateLimit',
    label: '租户遥测数据点速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入租户遥测数据点速率限制',
    },
  },
  {
    field: 'transportDeviceMsgRateLimit',
    label: '传输设备消息速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入传输设备消息速率限制',
    },
  },
  {
    field: 'transportDeviceTelemetryMsgRateLimit',
    label: '设备遥测消息速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入设备遥测消息速率限制',
    },
  },
  {
    field: 'transportDeviceTelemetryDataPointsRateLimit',
    label: '设备遥测数据点速率限制',
    colProps: { span: 24 },
    component: 'Input',
    componentProps: {
      placeholder: '请输入设备遥测数据点速率限制',
    },
  },
];
