const dayjs = require('dayjs');

const enums = require('../../enums');
const dateTimeFormatConfig = require('../../config/datetimeFormat');

const now = dayjs().format(dateTimeFormatConfig.datetime.value);

module.exports = [
  {
    moduleId: enums.moduleId.validations,
    name: 'id',
    label: 'ID',
    inputType: enums.inputType.number,
    dataType: enums.dataType.integer,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: true,
    notNull: true,
    unique: true,
    sequence: 1,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.validations,
    name: 'moduleId',
    label: 'Module ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.tableReference,
    tableRef: 'modules',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 2,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.validations,
    name: 'actionId',
    label: 'Action ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.tableReference,
    tableRef: 'actions',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 3,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.validations,
    name: 'scriptId',
    label: 'Script ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.tableReference,
    tableRef: 'scripts',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 4,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.validations,
    name: 'validationTimeId',
    label: 'validation Time ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.tableReference,
    tableRef: 'validationtimes',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 5,
    createdAt: now,
    updatedAt: now,
  },
];
