Skip to content

Commit b09af5e

Browse files
committed
add latlng to test entity
1 parent 1b1fb3a commit b09af5e

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

sequelize/data/entity.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"state": "MD",
1010
"zip": "12345"
1111
},
12+
"latlng": [
13+
39.296399,
14+
-76.607842
15+
],
1216
"description": "Everything for the left handed man, woman, and child!"
1317
}
1418
]

sequelize/migrations/04-create-demo-entity.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ module.exports = {
1414
},
1515
address: {
1616
type: Sequelize.JSON,
17-
},
17+
},
18+
latlng: {
19+
type: Sequelize.JSON,
20+
},
1821
phone: {
1922
type: Sequelize.JSON,
2023
},

sequelize/seeders/04-demo-entity.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
element.email = JSON.stringify(element.email);
1414
element.phone = JSON.stringify(element.phone);
1515
element.address = JSON.stringify(element.address);
16+
element.latlng = JSON.stringify(element.latlng);
1617
}
1718

1819
return queryInterface.bulkInsert('Entities', entities);

src/models/entity.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const entity = (sequelize, DataTypes) => {
1616
address: {
1717
type: DataTypes.JSON,
1818
},
19+
latlng: {
20+
type: DataTypes.JSON,
21+
},
1922
phone: {
2023
type: DataTypes.JSON,
2124
},

0 commit comments

Comments
 (0)