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.files,
    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.files,
    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: 2,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.files,
    name: 'data',
    label: 'Data',
    inputType: enums.inputType.file,
    dataType: enums.dataType.byte,
    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.files,
    name: 'type',
    label: 'Type',
    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.files,
    name: 'encoding',
    label: 'Encoding',
    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: 5,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.files,
    name: 'size',
    label: 'Size',
    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: true,
    unique: false,
    sequence: 6,
    createdAt: now,
    updatedAt: now,
  },
  {
    moduleId: enums.moduleId.files,
    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: 7,
    createdAt: now,
    updatedAt: now,
  },
];
