import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import {
  WorkflowTemplate, WorkflowTemplateSchema,
  MatterWorkflow, MatterWorkflowSchema,
  Matter, MatterSchema,
} from '../common/schemas'
import { WorkflowTemplatesController, WorkflowsController } from './workflows.controller'
import { WorkflowsService } from './workflows.service'
import { WorkflowLibrarySeeder } from './workflow-library.seeder'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: WorkflowTemplate.name, schema: WorkflowTemplateSchema },
      { name: MatterWorkflow.name,   schema: MatterWorkflowSchema },
      { name: Matter.name,           schema: MatterSchema },
    ]),
  ],
  controllers: [WorkflowTemplatesController, WorkflowsController],
  providers: [WorkflowsService, WorkflowLibrarySeeder],
  exports: [WorkflowsService],
})
export class WorkflowsModule {}
