import { ModelConfig } from "../.types";
import { pageActions, PAGE_SIZE } from "./_common";

export const AgendaJob: ModelConfig = 
{ 
  metadata: {
    nameKeys: ["name"],
    pageActions,
  },
  table: {
    toolbar: {
      searchBar: {
        fields: ["id","name"],
        containsFields: ["name"],
        placeholder: "id,name",
      },
      actions: [
        {action: 'REFRESH', desc: 'Refresh'},
        {action: 'SETTING', desc: 'Setting'},
        {
          action: "EXPORT",
          desc: 'export',
          fields: ["*","!createdAt","!created_at"]
        },
      ],
    },
    header: {
      filter: [],
      sorter: ["id"],
    },
    fields: ["*","!createdAt","!created_at"],
    rowSelection: {
      actions: [
        {action: 'EXPORT', desc: 'Export'},
      ],
    },
    rowActions: {
      visibleNum: 1,
      actions: [],
    },
    params: {
      pageSize: PAGE_SIZE,
    },
  },
  form: {
    fields: ["*","!creator","!createdAt","!updatedAt","!created_at","!updated_at"],
    reaction: {
      id: {
        toggle: [],
        defaultProps: {
          hidden: true,
        },
      },
    },
  },
  show: {
    fields: ["*","!createdAt","!created_at"],
  },
}
;
