为我的nodejs项目使用sequelizejs
定义了多个模型。这是event.js
中事件模型的示例:
const Event = db.define('event', {
id: {type: Sql.INTEGER,
primaryKey:true,
min: 1},
name: {type: Sql.STRING,
min:2,
allowNull: false,
},
event_info: {type: Sql.JSON},
current_step: {type: Sql.STRING},
customer_id: {type: Sql.INTEGER},
access_list: {type: Sql.JSON},
event_snapshot: {type: Sql.JSON},
event_category_id: {type: Sql.INTEGER,
},
status: {type: Sql.STRING,
isIn: ['active', 'cancelled', 'aborted', 'completed']},
last_updated_by_id: {type: Sql.INTEGER},
createdAt: Sql.DATE,
updatedAt: Sql.DATE
});
是否可以在命令行的event
中创建event.js
表?