- Introduced Jurisdiction and RuleCategory entities along with their respective values. - Implemented service methods for managing rule categories and values. - Updated MasterDataService to include seeding logic for jurisdictions and rule categories. - Added DTOs for creating and updating rule categories and values. feat(policy-engine): enhance policy management with new entities and operations - Created Policy, PolicyRule, PolicyAction, PolicyTargetAudience, and RuleCondition entities. - Implemented create, update, and delete operations for policies and their associated rules and actions. - Added enums for PolicyStatus and AudienceType to manage policy states and target audiences. - Developed DTOs for creating and updating policies with nested structures for rules and audiences.
28 lines
955 B
TypeScript
28 lines
955 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { PolicyEngineService } from './policy-engine.service';
|
|
import { PolicyEngineController } from './policy-engine.controller';
|
|
import { Policy } from './entities/policy.entity';
|
|
import { PolicyTargetAudience } from './entities/policy-target-audience.entity';
|
|
import { PolicyRule } from './entities/policy-rule.entity';
|
|
import { RuleCondition } from './entities/rule-condition.entity';
|
|
import { PolicyAction } from './entities/policy-action.entity';
|
|
import { MasterDataModule } from '../master-data/master-data.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
TypeOrmModule.forFeature([
|
|
Policy,
|
|
PolicyTargetAudience,
|
|
PolicyRule,
|
|
RuleCondition,
|
|
PolicyAction,
|
|
]),
|
|
MasterDataModule,
|
|
],
|
|
controllers: [PolicyEngineController],
|
|
providers: [PolicyEngineService],
|
|
exports: [PolicyEngineService],
|
|
})
|
|
export class PolicyEngineModule { }
|