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.fields,
    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.fields,
    name: 'moduleId',
    label: 'Module ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.integer,
    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.fields,
    name: 'name',
    label: 'Name',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 3,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'label',
    label: 'Label',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 4,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'inputType',
    label: 'Input Type',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.integer,
    tableRef: 'inputtypes',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 5,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'inputType',
    label: 'Input Type',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.integer,
    tableRef: 'datatypes',
    tableRefKey: 'id',
    tableRefName: 'label',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 6,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'tableRef',
    label: 'Table Ref',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 7,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'tableRefKey',
    label: 'Table Ref Key',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 8,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'tableRefName',
    label: 'Table Ref Name',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 9,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'tableRefAlias',
    label: 'Table Ref Alias',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 10,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'tableRefFilter',
    label: 'Table Ref Filter',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 11,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'regex',
    label: 'Regex',
    inputType: enums.inputType.shortText,
    dataType: enums.dataType.varchar,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 12,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'multiSelect',
    label: 'Multi Select',
    inputType: enums.inputType.toggle,
    dataType: enums.dataType.boolean,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 13,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'identity',
    label: 'Identity',
    inputType: enums.inputType.toggle,
    dataType: enums.dataType.boolean,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 14,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'notNull',
    label: 'Not Null',
    inputType: enums.inputType.toggle,
    dataType: enums.dataType.boolean,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 15,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'unique',
    label: 'Unique',
    inputType: enums.inputType.toggle,
    dataType: enums.dataType.boolean,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 16,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'autoIncrement',
    label: 'Auto Increment',
    inputType: enums.inputType.toggle,
    dataType: enums.dataType.boolean,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 17,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.fields,
    name: 'sequence',
    label: 'Sequence',
    inputType: enums.inputType.number,
    dataType: enums.dataType.integer,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 18,
    createdAt: now,
    updatedAt: now,
  },
];
