You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
443 B

  1. 'use strict'
  2. /**
  3. * Settings schema
  4. */
  5. module.exports = (sequelize, DataTypes) => {
  6. let settingSchema = sequelize.define('setting', {
  7. key: {
  8. type: DataTypes.STRING,
  9. allowNull: false
  10. },
  11. config: {
  12. type: DataTypes.JSONB,
  13. allowNull: false
  14. }
  15. }, {
  16. timestamps: true,
  17. version: true,
  18. indexes: [
  19. {
  20. unique: true,
  21. fields: ['key']
  22. }
  23. ]
  24. })
  25. return settingSchema
  26. }