usersEventLogs.js 971 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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('UsersEventLogs', {
  6. id: {
  7. type: DataTypes.INTEGER(10).UNSIGNED,
  8. allowNull: false,
  9. primaryKey: true,
  10. autoIncrement: true,
  11. },
  12. user_id: {
  13. type: DataTypes.INTEGER(10).UNSIGNED,
  14. allowNull: true,
  15. },
  16. event_count: {
  17. type: DataTypes.INTEGER(10),
  18. allowNull: true,
  19. },
  20. event_name: {
  21. type: DataTypes.STRING(255),
  22. allowNull: true,
  23. },
  24. event_params: {
  25. type: DataTypes.STRING(255),
  26. allowNull: true,
  27. },
  28. update_time: {
  29. type: DataTypes.TIME,
  30. allowNull: true,
  31. },
  32. create_time: {
  33. type: DataTypes.DATE,
  34. allowNull: true,
  35. },
  36. }, {
  37. tableName: 'szj_users_event_logs',
  38. });
  39. Model.associate = function() {
  40. };
  41. // 同步:没有就新建,有就不变
  42. Model.sync();
  43. return Model;
  44. };