dinner_coin_logs.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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('DinnerCoinLogs', {
  6. log_id: {
  7. type: DataTypes.INTEGER(16).UNSIGNED,
  8. allowNull: false,
  9. primaryKey: true,
  10. autoIncrement: true,
  11. },
  12. log_desc: {
  13. type: DataTypes.STRING(64),
  14. allowNull: true,
  15. },
  16. action_user: {
  17. type: DataTypes.STRING(64),
  18. allowNull: true,
  19. },
  20. account: {
  21. type: DataTypes.FLOAT(10, 2),
  22. allowNull: true,
  23. },
  24. user_id: {
  25. type: DataTypes.INTEGER(16).UNSIGNED,
  26. allowNull: true,
  27. },
  28. order_id: {
  29. type: DataTypes.INTEGER(16).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. create_time: {
  46. type: DataTypes.TIME,
  47. allowNull: true,
  48. },
  49. update_time: {
  50. type: DataTypes.TIME,
  51. allowNull: true,
  52. },
  53. partner_id: {
  54. type: DataTypes.INTEGER(11),
  55. allowNull: true,
  56. },
  57. customer_id: {
  58. type: DataTypes.INTEGER(10).UNSIGNED,
  59. allowNull: true,
  60. },
  61. customer_name: {
  62. type: DataTypes.STRING(255),
  63. allowNull: true,
  64. },
  65. customer_img: {
  66. type: DataTypes.STRING(255),
  67. allowNull: true,
  68. },
  69. ori_partner: {
  70. type: DataTypes.INTEGER(1),
  71. allowNull: true,
  72. },
  73. }, {
  74. tableName: 'szj_dinner_coin_logs',
  75. });
  76. Model.associate = function() {
  77. };
  78. // 同步:没有就新建,有就不变
  79. Model.sync();
  80. return Model;
  81. };