clean unused places/tags #107 and unused fields
This commit is contained in:
@@ -51,6 +51,7 @@ Event.belongsTo(User)
|
||||
User.hasMany(Event)
|
||||
|
||||
Event.belongsToMany(Tag, { through: 'event_tags' })
|
||||
Tag.belongsToMany(Event, { through: 'event_tags' })
|
||||
|
||||
Event.belongsToMany(Notification, { through: EventNotification })
|
||||
Notification.belongsToMany(Event, { through: EventNotification })
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const { Model, DataTypes } = require('sequelize')
|
||||
const sequelize = require('./index')
|
||||
|
||||
// const Event = require('./event')
|
||||
class Place extends Model {}
|
||||
|
||||
Place.init({
|
||||
@@ -11,14 +10,7 @@ Place.init({
|
||||
index: true,
|
||||
allowNull: false
|
||||
},
|
||||
address: DataTypes.STRING,
|
||||
confirmed: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: true,
|
||||
allowNull: false
|
||||
}
|
||||
address: DataTypes.STRING
|
||||
}, { sequelize, modelName: 'place' })
|
||||
|
||||
// Place.hasMany(Event)
|
||||
|
||||
module.exports = Place
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const { Model, DataTypes } = require('sequelize')
|
||||
// const Event = require('./event')
|
||||
const sequelize = require('./index')
|
||||
|
||||
class Tag extends Model {}
|
||||
@@ -10,19 +9,7 @@ Tag.init({
|
||||
allowNull: false,
|
||||
index: true,
|
||||
primaryKey: true
|
||||
},
|
||||
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' })
|
||||
|
||||
module.exports = Tag
|
||||
|
||||
Reference in New Issue
Block a user