Add user and employee management enhancements with database schema updates

- Introduced new columns `status`, `created_by`, and `updated_by` in the `users` table to track user status and ownership.
- Updated the `employees` table to include a foreign key reference to the `users` table via `user_id`.
- Created migration script `0012_users_primary.sql` to apply these changes to the database schema.
- Enhanced the `EmployeesService` and `EmployeesRepository` to support user assignments and related data retrieval.
- Updated DTOs and service methods to reflect the new user and employee relationships.
- Added unit tests to validate the new functionality and ensure data integrity.
- Modified existing controllers to accommodate the new fields and relationships in user and employee management.
This commit is contained in:
shancheas
2026-08-26 15:29:18 +07:00
parent f635ebeda0
commit 8a61c94078
50 changed files with 2175 additions and 401 deletions
+4 -1
View File
@@ -31,7 +31,10 @@ import { JwtStrategy } from './strategies/jwt.strategy';
},
}),
}),
ThrottlerModule.forRoot([{ ttl: 60_000, limit: 100 }]),
ThrottlerModule.forRoot({
skipIf: () => process.env.NODE_ENV === 'test',
throttlers: [{ ttl: 60_000, limit: 100 }],
}),
],
controllers: [AuthController],
providers: [