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