| 
														
															@@ -123,7 +123,7 @@ export class DataModule extends BaseModule { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		await this._sequelize.authenticate(); 
														 | 
														
														 | 
														
															 		await this._sequelize.authenticate(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		const setupAssociationFunctions: Function[] = []; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		const setupFunctions: Function[] = []; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		await forEachIn( 
														 | 
														
														 | 
														
															 		await forEachIn( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			await readdir( 
														 | 
														
														 | 
														
															 			await readdir( 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -140,8 +140,7 @@ export class DataModule extends BaseModule { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					default: ModelClass, 
														 | 
														
														 | 
														
															 					default: ModelClass, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					schema, 
														 | 
														
														 | 
														
															 					schema, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					options = {}, 
														 | 
														
														 | 
														
															 					options = {}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					setup, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					setupAssociations 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					setup 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				} = await import(`${modelFile.path}/${modelFile.name}`); 
														 | 
														
														 | 
														
															 				} = await import(`${modelFile.path}/${modelFile.name}`); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				const tableName = inflection.camelize( 
														 | 
														
														 | 
														
															 				const tableName = inflection.camelize( 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -155,10 +154,7 @@ export class DataModule extends BaseModule { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					sequelize: this._sequelize 
														 | 
														
														 | 
														
															 					sequelize: this._sequelize 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				}); 
														 | 
														
														 | 
														
															 				}); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				if (typeof setup === "function") await setup(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				if (typeof setupAssociations === "function") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					setupAssociationFunctions.push(setupAssociations); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				if (typeof setup === "function") setupFunctions.push(setup); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				await this._loadModelEvents(ModelClass.name); 
														 | 
														
														 | 
														
															 				await this._loadModelEvents(ModelClass.name); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -166,9 +162,7 @@ export class DataModule extends BaseModule { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			} 
														 | 
														
														 | 
														
															 			} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		); 
														 | 
														
														 | 
														
															 		); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		setupAssociationFunctions.forEach(setupAssociation => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			setupAssociation(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		await forEachIn(setupFunctions, setup => setup()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		await this._sequelize.sync(); 
														 | 
														
														 | 
														
															 		await this._sequelize.sync(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |