mirror of
https://github.com/requarks/wiki.git
synced 2025-02-25 18:55:30 -06:00
23 lines
340 B
JavaScript
23 lines
340 B
JavaScript
|
/**
|
||
|
* 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
|
||
|
}
|