import { Module } from "@nestjs/common";
import { TypeOrmModule } from "@nestjs/typeorm";
import {
  Employee,
  Organization,
  UserCredential,
} from "@tria-plc/iamapi-common";

import { Role } from "@tria-plc/iamapi-common/entities/iam/user/role.entity";
import { UserRole } from "@tria-plc/iamapi-common/entities/iam/user/user-role.entity";
import { User } from "@tria-plc/iamapi-common/entities/iam/user/user.entity";

import { BackofficeController } from "./backoffice.controller";
import { BackofficeService } from "./backoffice.service";

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Employee,
      Organization,
      Role,
      User,
      UserCredential,
      UserRole,
    ]),
  ],
  controllers: [BackofficeController],
  providers: [BackofficeService],
  exports: [BackofficeService],
})
export class BackofficeModule {}
