Skip to content

Fix/es6 migrations models#62

Merged
agaesh merged 6 commits intofix/es6-migrationfrom
fix/es6-migrations-models
Oct 11, 2025
Merged

Fix/es6 migrations models#62
agaesh merged 6 commits intofix/es6-migrationfrom
fix/es6-migrations-models

Conversation

@agaesh
Copy link
Owner

@agaesh agaesh commented Oct 11, 2025

🧱 Pull Request: Refactor Models to ES Module Syntax

Overview

This pull request migrates all Sequelize model files from CommonJS (require, module.exports) to ES Module (ESM) syntax (import, export default).
The refactor ensures consistency across the project and improves compatibility with modern Node.js tooling, especially when working with ES-based controllers and services.


Changes Included

  • ✅ Migrated Department model to ES module syntax
  • ✅ Migrated Instructor model to ES module syntax
  • ✅ Migrated ProgramCourse model to ES module syntax
  • ✅ Migrated Student model to ES module syntax
  • ✅ Migrated User model to ES module syntax
  • ✅ Refactored index.js for dynamic model loading using import syntax

Benefits

  • Modernized codebase for future maintainability
  • Eliminates mixed module syntax issues
  • Improves readability and consistency across all models
  • Supports smooth integration with refactored ES-based controllers and services

Reviewer Note:
All the models have been refactored in es style code. this will be merged with es6-migration branch without testing.

@agaesh agaesh linked an issue Oct 11, 2025 that may be closed by this pull request
7 tasks
@agaesh agaesh changed the base branch from main to fix/es6-migration October 11, 2025 14:03
@agaesh agaesh merged commit a6677ec into fix/es6-migration Oct 11, 2025
1 check failed
@agaesh
Copy link
Owner Author

agaesh commented Oct 11, 2025

This pull request have been merged into fix/es6-migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧱 Issue : Convert Models to ES6 Module Syntax

1 participant