import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SysRole } from './entities/SysRole';
import { SysMenu } from './entities/SysMenu';

// Core Services
import { CoreRoleService } from './services/core/CoreRoleService';
import { CoreMenuService } from './services/core/CoreMenuService';

// Admin Services
import { RoleAdminService } from './services/admin/RoleAdminService';
import { MenuAdminService } from './services/admin/MenuAdminService';

// Controllers
import { RoleController } from './controllers/adminapi/RoleController';
import { MenuController } from './controllers/adminapi/MenuController';

@Module({
  imports: [
    TypeOrmModule.forFeature([SysRole, SysMenu]),
  ],
  providers: [
    // Core Services
    CoreRoleService,
    CoreMenuService,
    
    // Admin Services
    RoleAdminService,
    MenuAdminService,
  ],
  controllers: [
    RoleController,
    MenuController,
  ],
  exports: [
    // Core Services
    CoreRoleService,
    CoreMenuService,
    
    // Admin Services
    RoleAdminService,
    MenuAdminService,
  ],
})
export class RbacModule {} 