/* indent size: 2 */ module.exports = app => { const DataTypes = app.Sequelize; const Model = app.model.define('Payments', { payment_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, primaryKey: true, autoIncrement: true }, user_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, pay_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, out_trade_no: { type: DataTypes.STRING(30), allowNull: true }, total_fee: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, trade_type: { type: DataTypes.STRING(100), allowNull: true }, transaction_id: { type: DataTypes.STRING(255), allowNull: true }, time_end: { type: DataTypes.STRING(100), allowNull: true }, openid: { type: DataTypes.STRING(100), allowNull: true }, sub_is_subscribe: { type: DataTypes.STRING(10), allowNull: true }, sub_openid: { type: DataTypes.STRING(100), allowNull: true }, is_subscribe: { type: DataTypes.STRING(10), allowNull: true }, fee_type: { type: DataTypes.STRING(100), allowNull: true }, bank_type: { type: DataTypes.STRING(100), allowNull: true }, cash_fee: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, is_refund: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: true }, refund_trade_no: { type: DataTypes.STRING(100), allowNull: true }, refund_desc: { type: DataTypes.STRING(255), allowNull: true }, refund_time: { type: DataTypes.DATE, allowNull: true }, create_time: { type: DataTypes.TIME, allowNull: true } }, { tableName: 'szj_payments' }); Model.associate = function() { } //同步:没有就新建,有就不变 Model.sync(); return Model; };