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

  return tagSchema
}