Skip to content

ASSIGNE MODEL


{
id: {
type: DataTypes.STRING,
primaryKey: true,
allowNull: false
},
name: {
type: DataTypes.STRING
},
}

// Foreign Keys
AddressModal.belongsTo(ContactModal, { foreignKey: 'contactId', as: 'contact' });
AddressModal.belongsTo(VisitModel, { foreignKey: 'contactId', as: 'contact' });
AddressModal.belongsTo(ExpenseModel, { foreignKey: 'contactId', as: 'contact' });


Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.