module.exports = {
  Accepted: {
    CHECK_READ_GUIDELINES: 1,
    CHECK_SEE_VIDEO_PRINCIPI: 2,
  },
  LIMIT_NOTIF_FOR_USER: 200,

  QUERYTYPE_MYGROUP: 1,
  QUERYTYPE_REFUSED_USER_GRP: 2,
  ALL_SAW_AND_ACCEPTED: 3,
  QUERYTYPE_CIRCUIT: 10,
  QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
  QUERYTYPE_LIST_MOVEMENTS: 15,
  QUERYTYPE_LIST_ALLMOVEMENTS: 16,
  QUERYTYPE_LIST_MOVEMENTS_GROUPNAME: 17,
  QUERYTYPE_LIST_MOVEMENTS_CONTOCOM: 18,
  QUERYTYPE_GROUP_CIRCUIT: 20,
  QUERYTYPE_REFUSED_GROUP_CIRCUIT: 22,
  // ---------------------

  FILTER_EXTRALIST_NOT_REGISTERED: 1,
  FILTER_EXTRALIST_NOT_CONTACTED: 2,
  FILTER_EXTRALIST_WITH_NOTE: 4,
  FILTER_USER_NO_ZOOM: 8,
  FILTER_USER_NO_INVITANTE: 16,
  FILTER_USER_NO_TELEGRAM_ID: 32,
  FILTER_USER_CODICE_AUTH_TELEGRAM: 64,
  FILTER_USER_NO_EMAIL_VERIFICATA: 128,
  FILTER_USER_NO_DREAM: 256,
  FILTER_EXTRALIST_DELETED: 512,
  FILTER_USER_TELEGRAM_BLOCKED: 1024,
  FILTER_ATTIVI: 2048,
  FILTER_NASCOSTI: 4096,
  FILTER_NAVI_NON_PRESENTI: 8192,
  FILTER_QUALIFIED: 16384,
  FILTER_ASK_ZOOM_VISTO: 32768,
  FILTER_HOURS_MYLIST: 65536,
  FILTER_HOURS_ALL: 131072,
  FILTER_REPORTED: 262144,
  FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
  FILTER_MEMBERSHIP_CARD_OK: 1048576,
  FILTER_USER_NO_VERIFIED_APORTADOR: 2097152,
  FILTER_USER_SI_TELEGRAM_ID: 4194304,
  FILTER_USER_WITHOUT_USERNAME_TELEGRAM: 8388608,
  FILTER_USER_PROVINCE: 16777216,

  OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
  OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
  OPTIONS_SEARCH_USER_ALL_WORDS: 4,
  OPTIONS_ADD_COUNT_FAVORITE: 8,

  FRIENDSCMD: {
    SETTRUST: 121,
    REQFRIEND: 125,
    SETFRIEND: 132,
    SETHANDSHAKE: 133,
    REMOVE_FROM_MYFRIENDS: 144,
    REFUSE_REQ_FRIEND: 145,
    CANCEL_REQ_FRIEND: 146,
    REMOVE_FROM_MYHANDSHAKE: 147,
    BLOCK_USER: 155,
    UNBLOCK_USER: 156,
    REPORT_USER: 158,
    FIND_PEOPLE: 166,
  },

  GROUPSCMD: {
    SETTRUST: 1121,
    REQGROUP: 1125,
    SETGROUP: 1132,
    REMOVE_FROM_MYGROUP: 1144,
    REFUSE_REQ_GROUP: 1145,
    CANCEL_REQ_GROUP: 1146,
    BLOCK_GROUP: 1155,
    FIND_GROUP: 1166,
    DELETE_GROUP: 1170,
    ADDADMIN_OFMYGROUP: 1180,
    REMOVEADMIN_OFMYGROUP: 1185,
  },

  CIRCUITCMD: {
    CREATE: 1001,
    REQ: 2000,
    SET: 2001,
    SETFIDO: 2005,
    REMOVE_FROM_MYLIST: 2144,
    REFUSE_REQ: 2145,
    CANCEL_REQ: 2146,
    DELETE: 2170,
    ADDADMIN: 2180,
    REMOVEADMIN: 2185,
    SENDCOINS_REQ: 2200,
    SENDCOINS_REQ_SENT: 2205,
    SENDCOINS_ACCEPT: 2210,
    SENDCOINS_ACCEPT_SENT: 2212,
    SENDCOINS_REFUSE: 2220,
    SENDCOINS_REFUSE_SENT: 2222,
  },

  USERCMD: {
    FAVORITE: 3001,
  },

  REPORT_FILT_RESP: 1,
  REPORT_FILT_ATTIVITA: 2,

  PUBTOSHARE: {
    ALL: 0,
    ONLY_TABLE_FOLLOW: 1,
  },

  TAB_COUNTRY: 'countries',
  TAB_PHONES: 'phones',
  TAB_SETTINGS: 'settings',
  TAB_SITES: 'sites',
  TAB_MYGROUPS: 'mygroups',
  TAB_MYCIRCUITS: 'circuits',
  TAB_BOTS: 'bots',
  TAB_USERS: 'users',

  KEY_TO_CRYPTED: ['PWD_FROM'],
  SITES_KEY_TO_CRYPTED: ['email_pwd'],
  MYGROUPS_KEY_TO_CRYPTED: 'pwd',

  SUFFIX_CRYPTED: ['_cryp'],

  TablePickup: ['countries', 'phones'],

  PaymentTypes: [
    'Nessuno',
    'Bonifico Bancario',
    'Paypal',
    'In Contanti alla CNM',
  ],

  PARAM_SHOW_PROVINCE: 1,

  TABLES_MYSKILLS: 'myskills',
  TABLES_MYBACHECAS: 'mybachecas',
  TABLES_MYHOSPS: 'myhosps',
  TABLES_MYGOODS: 'mygoods',
  TABLES_MYEVENTS: 'myevents',
  TABLES_CIRCUITS: 'circuits',
  TABLES_MYGROUPS: 'mygroups',

  MYTABS: [{ id: 0, table: 'none' },
  { id: 1, table: 'myskills' },
  { id: 2, table: 'mybachecas' },
  { id: 3, table: 'myhosps' },
  { id: 4, table: 'mygoods' },
  { id: 5, table: 'myevents' }],

  CMD_REACTION: {
    SET_FAVORITE: 1,
    SET_BOOKMARK: 2,
    SET_SEEN: 3,
    SET_ATTEND: 4,
  },

  REACTIONS_FIELD:
  {
    numseen: 1,
    numbook: 1,
    numfav: 1,
    numattend: 1,
  },

  TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps', 'myskills', 'mygoods'],
  TABLES_REACTIONS: ['mybachecas', 'myhosps', 'myskills', 'mygoods'],

  TABLES_USER_INCLUDE_MY: ['mygroups', 'circuits'],
  TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
  TABLES_INSERT_ALMOST_ONE_TO_ENABLE_CIRCUIT: ['myskills', 'myhosps', 'mygoods'],
  //++Todo: per abilitare gli utenti ad inserire un Circuito aggiungere 'circuits' alla lista TABLES_PERM_NEWREC
  TABLES_PERM_NEWREC: ['skills', 'goods', 'subskills', 'mygroups', 'myhosps'],
  TABLES_REC_ID: ['skills', 'goods', 'subskills'],
  TABLES_FAVORITE_BOOKMARK: ['myskills', 'mygoods', 'mybachecas', 'myhosps'],

  TABLES_VISU_STAT_IN_HOME: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups', 'circuits'],

  TABLES_ADV_NOTIFICATION: ['myskills', 'myhosps', 'mygoods'],
  TABLES_ORDER_DATE_UPDATED: ['myskills', 'myhosps', 'mygoods'],
  TABLES_ORDER_DESCR: ['mygroups'],
  TABLES_EVENTS_NOTIFICATION: ['mybachecas'],
  TABLES_GROUPS_NOTIFICATION: ['mygroups'],
  TABLES_CIRCUITS_NOTIFICATION: ['circuits'],

  TABLES_NUM_AS_ID_NUMBER: [],

  TABLES_ID_STRING: [
    'circuits',
    'accounts',
    'movements',
  ],

  TABLES_ID_NUMBER: [
    'permissions',
    'levels',
    'adtypes',
    'adtypegoods',
    'statusSkills',
    'sectors',
    'sectorgoods',
    'catgrps',
    'skills',
    'subskills',
    'cities',
    'provinces',
    // 'myskills',
    // 'mybachecas',
    // 'myhosps',
    // 'mygoods',
    // 'mygroups'
  ],
  TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
  TABLES_CREATEDBY: ['mygroups', 'circuits'],
  TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots', 'mygroups', 'circuits'],

  TABLES_FIELDS_DESCR_AND_CITY_AND_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],

  TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],

  TABLES_POPULATE_DATA: [
    {
      table: 'adtypegoods',
      key: 'descr',
    }, {
      table: 'adtypes',
      key: 'descr',
    },
    { table: 'catgrps', key: 'descr' },
    {
      table: 'contribtypes',
      key: 'descr',
    },
    { table: 'goods', key: 'descr' },
    { table: 'levels', key: 'descr' },
    { table: 'cities', key: 'comune' },
    { table: 'provinces', key: 'descr' },
    { table: 'sectorgoods', key: 'descr' },
    { table: 'sectors', key: 'descr' },
    { table: 'skills', key: 'descr' },
    { table: 'statusSkills', key: 'descr' },
  ],

  VISIB_ALL: 0,
  VISIB_ONLYIF_VERIFIED: 1,
  VISIB_ONLY_MANAGER: 2,
  VISIB_ONLY_ADMIN: 4,

  CIRCUIT_CFG: {
    MULT_FIDO_USER: 2.0,
    MULT_FIDO_GROUP: 2.0,
  },


  Visibility_Group: {
    PRIVATE: 1,
    HIDDEN: 2,
    // PASSWORD: 4,
  },

  BOTTYPE_NONE: 0,
  BOTTYPE_PAGE: 1,
  BOTTYPE_LINK: 2,
  BOTTYPE_TEXT: 3,
  BOTTYPE_MENU: 4,
  BOTTYPE_MARKDOWN: 5,
  BOTTYPE_BOTTONI_INLINE: 6,

  RIS_OK: '👍🏻 OK',

  CashType: {
    None: 0,
    Incoming: 1,
    Outcoming: 2,
  },

  Cmd: {
    PROVINCE: 1,
    COMUNI: 2,
    CITIES_SERVER: 3,
  },

  WalletFinalStatusType: {
    None: 0,
    InCommonCash: 1,
    InMyWallet: 2,
  },

  Permissions: {
    Admin: 1,
    Manager: 2,
    Teacher: 4,
    Facilitatore: 8,
    Editor: 16,
    Zoomeri: 32,
    Department: 64,
  },

  MessageOptions: {
    Notify_OnlyToNotifinApp: 1,
    Notify_ByEmail: 2,
    Notify_ByPushNotification: 4,
    Notify_ByBotTelegram: 8,
  },

  TypeMsg: {
    SEND_TO_ALL: 1,
    SEND_TO_SOCI: 2,
    SEND_TO_SOCIO_RESIDENTE: 3,
    SEND_TO_CONSIGLIO: 5,
    SEND_TO_NON_SOCI: 10,
    SEND_TO_PAOLO: 20,
    SEND_TO_USER: 25,
    SEND_TO_GROUP: 30,
    SEND_TO_CIRCUIT: 35,
    SEND_TO_MYSELF: 40,
    SEND_TO_TELEG_NO_USERNAME_TELEG: 50,
    SEND_TO_TELEG_NO_VERIF_BY_APORTADOR: 60,
  },

  TypeMsg_Actions: {
    NORMAL: 0,
    YESNO: 1,
    OPZ1_2: 2,
  },

  CallFunz: {
    SOSTITUISCI: 345,
    AGGIUNGI_NUOVO_IMBARCO: 380,
    CANCELLA_IMBARCO: 385,
    DAMMI_PRIMO_UTENTE_LIBERO: 390,
    GET_VALBYTABLE: 400,
    SET_VALBYTABLE: 410,
    ZOOM_GIA_PARTECIPATO: 510,
    REGISTRATION: 6,
    RICHIESTA_GRUPPO: 10,
    RICHIESTA_AMICIZIA: 15,
    RICHIESTA_HANDSHAKE: 16,
    RICHIESTA_CIRCUIT: 20,
    RICHIESTA_FIDO: 25,
    ENTRA_RIS_ITALIA: 30,
  },

  OrderStatus: {
    NONE: 0,
    IN_CART: 1,
    CHECKOUT_SENT: 2,
    ORDER_CONFIRMED: 3,
    PAYED: 4,
    DELIVEDED: 5,
    RECEIVED: 6,
    CANCELED: 10,
  },

  OrderStatusView: {
    CHECKOUT_SENT: 2,
    ORDER_CONFIRMED: 3,
    PAYED: 4,
    RECEIVED: 6,
    CANCELED: 10,
  },

  ConfSite: {
    Notif_Reg_Bot_ToManagers: 1,
    Notif_Reg_Push_Admin: 2,
    Need_Aportador_On_DataReg_To_Verify_Reg: 4,
    AskInvitantesulBot: 8,
    AskUsernameSulBot: 16,
    registerUserWithBot: 32,
  },

  MsgTeleg: {
    SHARE_MSGREG: 1,
    SHARE_TEXT: 2,
  },

  TypeMsgTemplate: {
    MSG_BENVENUTO: 2010,
    MS_SHARE_LINK: 2000,
  },

  TypeSend: {
    PUSH_NOTIFICATION: 1,
    TELEGRAM: 2,
  },
  UsersNotif: {
    NEW_ADV_CITY: 1,
    NEW_ADV_PROVINCE: 2,
    NEW_ADV_REGION: 4,
    NEW_ADV_MY_GROUPS: 8,
    NEW_ADV_MY_RIS_CIRCUIT: 16,
    NEW_ADV_SECTOR: 32,
    NEW_ADV_YOUR_PROVINCE: 64,
  },

  StatusNotifs: {
    STATUS_FRIENDS_ACCEPTED: 1,
    STATUS_FRIENDS_REFUSED: 2,
    STATUS_FRIENDS_REPORTED: 3,
    STATUS_HANDSHAKE_ACCEPTED: 10,
    STATUS_HANDSHAKE_REFUSED: 11,
  },

  GroupsNotifs: {
    STATUS_GROUPS_NEW: 1,
    STATUS_GROUPS_ACCEPTED: 3,
    STATUS_GROUPS_REFUSED: 4,
    STATUS_GROUPS_BLOCKED: 5,
    STATUS_GROUPS_DELETED: 6,
    STATUS_GROUPS_REMOVED: 7,
  },

  CircuitsNotif: {
    STATUS_NONE: 0,
    STATUS_NEW: 51,
    STATUS_ACCEPTED: 53,
    STATUS_REFUSED: 54,
    STATUS_BLOCKED: 55,
    STATUS_DELETED: 56,
    STATUS_REMOVED: 57,
    STATUS_COINS_ACCEPTED: 60,
    STATUS_COINS_REFUSED: 61,
    STATUS_COINS_ACCEPTED_SENT: 62,
    STATUS_COINS_REFUSED_SENT: 63,
  },

  QualiNotifs: {
    CIRCUITS: 1,
    OTHERS: 2,
  },

  TypeNotifs: {
    TYPEDIR_BACHECA: 1,
    ID_BACHECA_NEW_GOOD: 1,
    ID_BACHECA_NEW_SERVICE: 2,
    ID_BACHECA_NEW_HOSP: 4,

    TYPEDIR_EVENTS: 2,
    ID_EVENTS_NEW_REC: 1,
    ID_EVENTS_REMOVE_REC: 2,
    ID_EVENTS_ATTEND: 4,
    ID_EVENTS_SEND_MSG: 8,

    TYPEDIR_FRIENDS: 3,
    ID_FRIENDS_NEW_REC: 1,
    ID_FRIENDS_ACCEPTED: 2,
    ID_FRIENDS_REFUSED: 4,
    ID_FRIENDS_ACCEPTED_MY_REQUEST: 8,
    ID_FRIENDS_REPORTED: 16,
    ID_FRIENDS_UNBLOCKED: 32,

    TYPEDIR_GROUPS: 4,
    ID_GROUP_NEW_REC: 1,
    ID_GROUP_ACCEPTED: 2,
    ID_GROUP_REFUSED: 4,
    ID_GROUP_REQUEST_TO_ENTER: 8,
    ID_GROUP_BLOCK_USER: 16,
    ID_GROUP_DELETE_USER: 32,
    ID_GROUP_REMOVED: 64,
    ID_GROUP_ADDED_ADMIN_OFMYGROUP: 128,
    ID_GROUP_REMOVED_ADMIN_OFMYGROUP: 256,

    TYPEDIR_CIRCUITS: 5,
    ID_CIRCUIT_NEW_REC: 1,
    ID_CIRCUIT_ACCEPTED: 2,
    ID_CIRCUIT_REFUSED: 4,
    ID_CIRCUIT_REQUEST_TO_ENTER: 8,
    ID_CIRCUIT_BLOCK_USER: 16,
    ID_CIRCUIT_DELETE_USER: 32,
    ID_CIRCUIT_REMOVED: 64,
    ID_CIRCUIT_ADDED_ADMIN: 128,
    ID_CIRCUIT_REMOVED_ADMIN: 256,
    ID_CIRCUIT_SENDCOINSREQ: 512,
    ID_CIRCUIT_COINS_ACCEPTED: 1024,
    ID_CIRCUIT_COINS_REFUSED: 2048,
    ID_CIRCUIT_SENDCOINSREQ_SENT: 4096,
    ID_CIRCUIT_COINS_ACCEPTED_SENT: 8192,
    ID_CIRCUIT_COINS_REFUSED_SENT: 16384,
    ID_CIRCUIT_SETFIDO: 32768,

    TYPEDIR_BOOKING: 6,

    TYPEDIR_MSGS: 7,
    ID_MSGS_NEW_REC: 1,

    TYPEDIR_HANDSHAKE: 10,
    ID_HANDSHAKE_ACCEPTED: 2,

    TYPEDIR_FAVORITE: 11,
    ID_FAVORITE_ADDED: 1,

    TYPEDIR_TEST: 444,
    ID_TEST_NEW_REC: 1,
  },


  // Tipi di Notifiche:
  /*
  Notif: {
    UPDATE_APP: 1,
    NEW_GOOD_MY_PROVINCE: 12,
    NEW_GOOD_MY_COMUNE: 13,
    NEW_SERVICE_MY_PROVINCE: 14,
    NEW_SERVICE_MY_COMUNE: 15,
    NEW_HOSP_MY_PROVINCE: 16,
    NEW_HOSP_MY_COMUNE: 17,

    REQ_NEW_FRIEND: 20,
    ACCEPTED_NEW_FRIEND_REQ: 21,

    RIS_RECEIVED: 50,
    RIS_SENT_CONFIRMED: 51,
    RIS_SENT_REFUSED: 52,
  },

   */


  fieldsUserToChange() {
    return [
      '_id',
      'index',
      'username',
      'group',
      'email',
      'name',
      'surname',
      'perm',
      'date_reg',
      'verified_email',
      'verified_by_aportador',
      'ipaddr',
      'lasttimeonline',
      'profile',
      'calcstat',
      'news_on',
      'aportador_solidario',
      'made_gift',
      'ind_order',
      'old_order',
      'numinvitati',
      'numinvitatiattivi',
      'qualified'];
  },

  DEFAULT_NOTIFS_USER: [
    {
      'dir': 1,
      'value': 88
    },
    {
      'dir': 2,
      'value': 4
    },
    {
      'dir': 3,
      'value': 1
    },
    {
      'dir': 4,
      'value': 1
    },
    {
      'dir': 5,
      'value': 1
    },
    {
      'dir': 11,
      'value': 1
    },
    {
      'dir': 12,
      'value': 1
    },
  ],

  CIRCUIT_STATUS: {
    FASE0: 0,
    FASE1_CREAZIONE_GRUPPO: 1,
    FASE2_ORGANIZZAZIONE: 2,
    FASE3_MONETA_ABILITATA: 3,
  },

  CIRCUIT_PARAMS: {
    SCOPERTO_MIN_GRP: 200,
    SCOPERTO_MAX_GRP: 400,
    SCOPERTO_MIN_CONTO_COMUNITARIO: 500,
    SCOPERTO_MAX_CONTO_COMUNITARIO: 1000,
  },

  TABLETYPE: {
    DefaultCal: 0,
    MyBachecas: 1,
  },

  getProjectByTable(table, proj_add) {
    let proj = {}

    if (table === this.TABLES_MYGOODS) {
      proj = {
        'recGood': 1,
        'sectorGood': 1,
        'idSectorGood': 1,
        'idGood': 1,
        'idShipping': 1,
        'idStatusGood': 1,
        //**ADDFIELD_MYGOOD
      }

    } else if (table === this.TABLES_MYGROUPS) {
      proj = {
        groupname: 1,
        title: 1,
        descr: 1,
        img: 1,
        visibility: 1,
        admins: 1,
        idCatGrp: 1,
        date_created: 1,
        date_updated: 1,
        photos: 1,
        idCity: 1,
        note: 1,
        website: 1,
        link_telegram: 1,
        comune: 1,
        mycities: 1,
        sector: 1,
        recCatGrp: 1,
      }
    } else if (table === this.TABLES_CIRCUITS) {
      proj = {
        _id: 1,
        groupnameId: 1,
        path: 1,
        name: 1,
        strProv: 1,
        subname: 1,
        longdescr: 1,
        regulation: 1,
        numMembers: 1,
        totCircolante: 1,
        totTransato: 1,
        systemUserId: 1,
        createdBy: 1,
        date_created: 1,
        date_updated: 1,
        nome_valuta: 1,
        fido_scoperto_default: 1,
        deperimento: 1,
        showAlways: 1,
        status: 1,
        transactionsEnabled: 1,
        qta_max_default: 1,
        fido_scoperto_default_grp: 1,
        qta_max_default_grp: 1,
        valuta_per_euro: 1,
        symbol: 1,
        idCity: 1,
        pub_to_share: 1,
        visibility: 1,
        color: 1,
        abbrev: 1,
        data_costituz: 1,
        photos: 1,
        admins: 1,
        req_users: 1,
        refused_users: 1,
        'mycities': 1,
        //**ADDFIELD_CIRCUITS
      }
    } else if (table === this.TABLES_MYSKILLS) {
      proj = {
        recSkill: 1,
        sector: 1,
        idSector: 1,
        idSkill: 1,
        myskill: 1,
        idStatusSkill: 1,
        idContribType: 1,
        numLevel: 1,
        adType: 1,
        photos: 1,
        note: 1,
        website: 1,
        //**ADDFIELD_MYSKILL
      }

    } else if (table === this.TABLES_MYHOSPS) {
      proj = {
        visibile: 1,
        typeHosp: 1,
        numMaxPeopleHosp: 1,
        accomodation: 1,
        preferences: 1,
        idContribType: 1,
        photos: 1,
        idCity: 1,
        note: 1,
        website: 1,
        link_maplocation: 1,
      }

    } else if (table === this.TABLES_MYBACHECAS) {
      proj = {
        recSkill: 1,
        sector: 1,
        idSector: 1,
        idSkill: 1,
        // 'idSubSkill': 1,
        idStatusSkill: 1,
        idContribType: 1,
        dateTimeStart: 1,
        dateTimeEnd: 1,
        website: 1,
        organisedBy: 1,
        contact_phone: 1,
        contact_telegram: 1,
        address: 1,
        min_partecip: 1,
        max_partecip: 1,
        contribstr: 1,
        link_maplocation: 1,
        'mygrp.groupname': 1,
        'mygrp.title': 1,
        'mygrp.photos': 1,
          //**ADDFIELD_MYBACHECAS
      }
    }

    if (proj_add)
      proj = Object.assign({}, proj, proj_add);

    return proj;
  },

  getProjectForAll(proj_add, table) {
    let proj = {
      idContribType: 1,
      idCity: 1,
      pub_to_share: 1,
      adType: 1,
      photos: 1,
      note: 1,
      descr: 1,
      date_created: 1,
      date_updated: 1,
      userId: 1,
      username: 1,
      name: 1,
      surname: 1,
      groupname: 1,
      lasttimeonline: 1,
      comune: 1,
      myreact: 1,
      mycities: 1,
      lang: 1,
      'profile.img': 1,
      'profile.mygroups': 1,
      'profile.mycircuits': 1,
      'profile.qualifica': 1,
      'profile.resid_province': 1,
      'profile.resid_card': 1,
      'profile.username_telegram': 1,
      'profile.favorite': 1,
      'profile.bookmark': 1,
      'profile.attend': 1,
      'profile.seen': 1,
      reported: 1,
      date_report: 1,
      username_who_report: 1,
      namecomplete: 1,
      date_reg: 1,
    };

    if (proj_add)
      proj = Object.assign({}, proj, proj_add);

    proj = {...proj, ...this.REACTIONS_FIELD};

    if (table) {
      let proj_add3 = this.getProjectByTable(table);
      proj = Object.assign({}, proj, proj_add3);
    }

    return proj;
  },

  getDirectoryByTable(table, barre = false) {
    let add = '';
    if (barre)
      add = '/';

    if (table === 'myskills') {
      return add + 'myservice' + add
    } else if (table === 'mybachecas') {
      return add + 'mypage' + add
    } else if (table === 'myhosps') {
      return add + 'myhosps' + add
    } else if (table === 'mygoods') {
      return add + 'mygood' + add
    } else if (table === 'mygroups') {
      return add + 'grp' + add
    } else if (table === 'circuits') {
      return add + 'circuit' + add
    }

    return ''
  },

};
