mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
add slug place property
This commit is contained in:
parent
d3051f4b7e
commit
bdae46a304
2 changed files with 6 additions and 0 deletions
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue