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.

24 lines
354 B

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