rel_user_inviter.js 734 B

123456789101112131415161718192021222324252627282930313233343536
  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('RelUserInviter', {
  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. inviter_id: {
  17. type: DataTypes.INTEGER(10).UNSIGNED,
  18. allowNull: true,
  19. },
  20. create_time: {
  21. type: DataTypes.TIME,
  22. allowNull: true,
  23. },
  24. }, {
  25. tableName: 'szj_rel_user_inviter',
  26. });
  27. Model.associate = function() {
  28. };
  29. // 同步:没有就新建,有就不变
  30. Model.sync();
  31. return Model;
  32. };