import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Project } from '../project/entities/project.entity';
import { ProjectMember } from '../project/entities/project-member.entity';
import { Task } from './entities/task.entity';
import { ChecklistItem } from './entities/checklist-item.entity';
import { TaskCheckpoint } from './entities/task-checkpoint.entity';
import { CheckpointReport } from './entities/checkpoint-report.entity';
import { Comment } from './entities/comment.entity';
import { Attachment } from './entities/attachment.entity';
import { ActivityModule } from '../activity/activity.module';
import { NotificationModule } from '../notification/notification.module';
import { TaskService } from './task.service';
import { TaskController } from './task.controller';
import { MyTaskController } from './my-task.controller';

// 업무 모듈 (업무 CRUD + 상태 전이 + 체크리스트/댓글/첨부/승인) — 프로젝트 종속
@Module({
  imports: [
    TypeOrmModule.forFeature([
      Task,
      ChecklistItem,
      TaskCheckpoint,
      CheckpointReport,
      Comment,
      Attachment,
      Project,
      ProjectMember,
    ]),
    ActivityModule,
    NotificationModule,
  ],
  controllers: [TaskController, MyTaskController],
  providers: [TaskService],
  exports: [TaskService],
})
export class TaskModule {}
