创建的模型返回空数组

时间:2018-04-27 14:21:18

标签: node.js postgresql typescript express sequelize.js

我使用sequelize和typescript在我的快递中创建了两个模块但是当我尝试使用console.log(require('../models'))来记录模型时它会给出一个空数组。

{ models: {},
  sequelize:
   Sequelize {
     options:
      { dialect: 'postgres',
        dialectModulePath: null,
        host: '127.0.0.1',
        protocol: 'tcp',
        define: {},
        query: {},
        sync: {},
        timezone: '+00:00',
        logging: [Function: bound consoleCall],
        omitNull: false,
        native: false,
        replication: false,
        ssl: undefined,
        pool: {},
        quoteIdentifiers: true,
        hooks: {},
        retry: [Object],
        transactionType: 'DEFERRED',
        isolationLevel: null,
        databaseVersion: 0,

有人可以告诉我我做错了吗?

0 个答案:

没有答案