const dayjs = require('dayjs');

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

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

const list = [
  {
    moduleId: enums.moduleId.views,
    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.views,
    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: false,
    unique: false,
    sequence: 2,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.views,
    name: 'moduleId',
    label: 'Module ID',
    inputType: enums.inputType.dropdown,
    dataType: enums.dataType.tableReference,
    tableRef: 'modules',
    tableRefKey: 'id',
    tableRefName: 'name',
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: true,
    unique: false,
    sequence: 3,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.views,
    name: 'content',
    label: 'Content',
    inputType: enums.inputType.longText,
    dataType: enums.dataType.text,
    tableRef: null,
    tableRefKey: null,
    tableRefName: null,
    tableRefAlias: null,
    tableRefFilter: null,
    regex: null,
    multiSelect: false,
    identity: false,
    notNull: false,
    unique: false,
    sequence: 4,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.views,
    name: 'page',
    label: 'Page',
    inputType: enums.inputType.longText,
    dataType: enums.dataType.text,
    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,
  },
];

module.exports = list;
