add slug place property

This commit is contained in:
lesion 2024-12-23 17:06:16 +01:00
parent d3051f4b7e
commit bdae46a304
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,7 @@ const db = {
Event.belongsTo(Event, { as: 'parent' })
SequelizeSlugify.slugifyModel(Event, { source: ['title'], overwrite: false })
SequelizeSlugify.slugifyModel(Place, { source: ['name'], overwrite: false })
},
close() {

View file

@ -6,6 +6,11 @@ module.exports = (sequelize, DataTypes) =>
index: true,
allowNull: false
},
slug: {
type: DataTypes.STRING,
index: true,
unique: true
},
address: DataTypes.STRING,
latitude: DataTypes.FLOAT,
longitude: DataTypes.FLOAT,