{
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true,
allowNull: false
},
street: {
type: DataTypes.STRING
},
locality: {
type: DataTypes.STRING
},
city: {
type: DataTypes.STRING
},
pincode: {
type: DataTypes.INTEGER
},
latitude: {
type: DataTypes.DECIMAL(10, 4)
},
longitude: {
type: DataTypes.DECIMAL(10.4)
}
}
// Foreign Keys
AddressModal.belongsTo(ContactModal, { foreignKey: 'contactId', as: 'contact' });