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.menus,
    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.menus,
    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: 2,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.menus,
    name: 'tree',
    label: 'Tree',
    inputType: enums.inputType.code,
    dataType: enums.dataType.json,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 3,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.menus,
    name: 'roleId',
    label: 'Role ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.integer,
    tableRef: 'roles',
    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.menus,
    name: 'afterLogin',
    label: 'After Login',
    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: 5,
    createdAt: now,
    updatedAt: now,
  },
];
