/* indent size: 2 */ 'use strict'; module.exports = app => { const DataTypes = app.Sequelize; const Model = app.model.define('ProductSku', { id: { type: DataTypes.INTEGER(10).UNSIGNED, primaryKey: true, autoIncrement: true, }, product_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, }, volume: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, }, price: { type: DataTypes.FLOAT, allowNull: true, }, create_time: { type: DataTypes.DATE, allowNull: true, }, }, { tableName: 'szj_product_sku', }); Model.associate = function() { }; // 同步:没有就新建,有就不变 Model.sync(); return Model; };