我在我的node.js项目中使用sequelize,并且我不知道如何在另一个文件中导出和使用表模型。\n我将表模型保存在文件夹中,例如 Profile.js
\n\nmodule.exports = (sequielize, DataTypes) => sequielize.define(\'Profile\', {\n ID: {\n type: DataTypes.INTEGER,\n autoIncrement: true,\n primaryKey: true,\n allowNull: false\n },\n Login: {\n type: DataTypes.STRING(24),\n allowNull: false\n },\n SocialClub: {\n type: DataTypes.STRING(128),\n allowNull: false\n },\n Email: {\n type: DataTypes.STRING(64),\n allowNull: false\n },\n RegIP: {\n type: DataTypes.STRING(17),\n allowNull: false\n },\n LastIP:\n {\n type: DataTypes.STRING(17),\n allowNull: false\n },\n RegDate: {\n type: DataTypes.DATE,\n defaultValue: DataTypes.NOW,\n allowNull: false\n },\n LastDate: {\n type: DataTypes.DATE,\n defaultValue: DataTypes.NOW,\n allowNull: false\n }\n});\nRun Code Online (Sandbox Code Playgroud)\n\n我有这样的数据库模块database.js:
\n\nconst Sequelize = …Run Code Online (Sandbox Code Playgroud)