update profile and models

This commit is contained in:
Le Viet
2022-03-30 16:49:28 +07:00
parent 4e8d728142
commit eb5caa83a1
158 changed files with 7371 additions and 156 deletions
+56
View File
@@ -0,0 +1,56 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('SingaporeBuildings', {
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
address: {
type: DataTypes.STRING(150),
allowNull: false
},
blk_no: {
type: DataTypes.STRING(10),
allowNull: true
},
building: {
type: DataTypes.STRING(100),
allowNull: true
},
latitude: {
type: DataTypes.DECIMAL,
allowNull: true
},
longitude: {
type: DataTypes.DECIMAL,
allowNull: true
},
postal: {
type: DataTypes.STRING(6),
allowNull: false
},
road_name: {
type: DataTypes.STRING(40),
allowNull: false
},
searchval: {
type: DataTypes.STRING(100),
allowNull: false
},
x: {
type: DataTypes.DECIMAL,
allowNull: true
},
y: {
type: DataTypes.DECIMAL,
allowNull: true
}
}, {
sequelize,
tableName: 'singapore_buildings',
schema: 'public',
timestamps: false
});
};