/* indent size: 2 */ // eslint-disable-next-line strict module.exports = app => { const DataTypes = app.Sequelize; const Model = app.model.define('ViewOrderCommission', { commission: { type: DataTypes.FLOAT, allowNull: true, }, surplusAmout: { type: DataTypes.INTEGER(10), allowNull: true, }, orderAmount: { type: DataTypes.INTEGER(10), allowNull: true, }, orderNum: { type: DataTypes.STRING(255), allowNull: true, }, orderUser: { type: DataTypes.STRING(255), allowNull: true, }, inviterUser: { type: DataTypes.STRING(255), allowNull: true, }, orderTime: { type: DataTypes.TIME, allowNull: true, }, }, { tableName: 'view_order_commission', }); Model.associate = function() { // Model.belongsTo(app.model.AdminUser, { foreignKey: 'admin_id', targetKey: 'admin_id', as: 'admin_user' }); }; // 同步:没有就新建,有就不变 Model.sync(); return Model; };