123456789101112131415161718192021222324252627282930313233343536373839 |
- /* 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;
- };
|