Added foreign key constraints to the model