users_commission_logs.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* indent size: 2 */
  2. // eslint-disable-next-line strict
  3. module.exports = app => {
  4. const DataTypes = app.Sequelize;
  5. const Model = app.model.define('UsersCommissionLogs', {
  6. log_id: {
  7. type: DataTypes.INTEGER(10).UNSIGNED,
  8. allowNull: false,
  9. primaryKey: true,
  10. autoIncrement: true,
  11. },
  12. log_desc: {
  13. type: DataTypes.STRING(255),
  14. allowNull: true,
  15. },
  16. action_user: {
  17. type: DataTypes.STRING(255),
  18. allowNull: true,
  19. },
  20. commission: {
  21. type: DataTypes.FLOAT,
  22. allowNull: true,
  23. },
  24. user_id: {
  25. type: DataTypes.INTEGER(10).UNSIGNED,
  26. allowNull: true,
  27. },
  28. order_id: {
  29. type: DataTypes.INTEGER(10).UNSIGNED,
  30. allowNull: true,
  31. defaultValue: -1,
  32. },
  33. out_batch_no: {
  34. type: DataTypes.STRING(128),
  35. allowNull: true,
  36. },
  37. out_detail_no: {
  38. type: DataTypes.STRING(128),
  39. allowNull: true,
  40. },
  41. type: {
  42. type: DataTypes.INTEGER(2).UNSIGNED,
  43. allowNull: true,
  44. },
  45. inviter_id: {
  46. type: DataTypes.INTEGER(10).UNSIGNED,
  47. allowNull: true,
  48. },
  49. inviter_name: {
  50. type: DataTypes.STRING(255),
  51. allowNull: true,
  52. },
  53. inviter_img: {
  54. type: DataTypes.STRING(255),
  55. allowNull: true,
  56. },
  57. create_time: {
  58. type: DataTypes.TIME,
  59. allowNull: true,
  60. },
  61. }, {
  62. tableName: 'szj_users_commission_logs',
  63. });
  64. Model.associate = function() {
  65. };
  66. // 同步:没有就新建,有就不变
  67. Model.sync();
  68. return Model;
  69. };