251121:1700 Backend T3 wait testt

This commit is contained in:
admin
2025-11-21 17:16:40 +07:00
parent 58cee2d007
commit bf0308e350
27 changed files with 6651 additions and 196 deletions

View File

@@ -3,12 +3,22 @@ import { TypeOrmModule } from '@nestjs/typeorm';
import { UserService } from './user.service.js';
import { UserController } from './user.controller.js'; // 1. Import Controller
import { User } from './entities/user.entity.js';
import { UserAssignmentService } from './user-assignment.service.js';
import { UserAssignment } from './entities/user-assignment.entity.js';
@Module({
imports: [TypeOrmModule.forFeature([User])], // จดทะเบียน Entity
// 2. เพิ่มบรรทัดนี้ เพื่อบอก NestJS ว่ามี Controller นี้อยู่
imports: [
// 3. ลงทะเบียน Entity ทั้ง User และ UserAssignment
TypeOrmModule.forFeature([User, UserAssignment]),
], // 2. เพิ่มบรรทัดนี้ เพื่อบอก NestJS ว่ามี Controller นี้อยู่
controllers: [UserController],
providers: [UserService],
exports: [UserService], // Export ให้ AuthModule เรียกใช้ได้
providers: [
UserService,
UserAssignmentService, // <--- 4. ลงทะเบียน Service เป็น Provider
],
exports: [
UserService,
UserAssignmentService, // <--- 5. Export เผื่อที่อื่นใช้
], // Export ให้ AuthModule เรียกใช้ได้
})
export class UserModule {}