add confirmed field in schema

This commit is contained in:
les 2020-08-31 16:44:03 +02:00
parent f12b13c40f
commit f73168ae9e
2 changed files with 16 additions and 2 deletions

View file

@ -11,7 +11,12 @@ Place.init({
index: true,
allowNull: false
},
address: DataTypes.STRING
address: DataTypes.STRING,
confirmed: {
type: DataTypes.BOOLEAN,
defaultValue: true,
allowNull: false
}
}, { sequelize, modelName: 'place' })
// Place.hasMany(Event)

View file

@ -11,7 +11,16 @@ Tag.init({
index: true,
primaryKey: true
},
weigth: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false }
weigth: {
type: DataTypes.INTEGER,
defaultValue: 0,
allowNull: false
},
confirmed: {
type: DataTypes.BOOLEAN,
defaultValue: true,
allowNull: false
}
}, { sequelize, modelName: 'tag' })
// Tag.belongsToMany(Event, { through: 'event_tags' })