Files
yara724api/src/fanavaran/fanavaran-lookup.module.ts
T

64 lines
2.0 KiB
TypeScript

import { Module } from "@nestjs/common";
import { HttpModule } from "@nestjs/axios";
import { ConfigModule, ConfigService } from "@nestjs/config";
import { MongooseModule } from "@nestjs/mongoose";
import { BranchDbService } from "src/client/entities/db-service/branch.db.service";
import {
BranchModel,
BranchSchema,
} from "src/client/entities/schema/branch.schema";
import { createHttpModuleOptions } from "src/core/config/http-proxy.factory";
import {
LookupModel,
LookupSchema,
} from "src/lookups/entities/schema/lookup.schema";
import { UsersModule } from "src/users/users.module";
import { FanavaranAuditModule } from "./fanavaran-audit.module";
import { FanavaranAuthService } from "./fanavaran-auth.service";
import { FanavaranClientConfigService } from "./fanavaran-client-config.service";
import { FanavaranLocationService } from "./fanavaran-location.service";
import { FanavaranLookupService } from "./fanavaran-lookup.service";
import {
FanavaranAuthToken,
FanavaranAuthTokenSchema,
} from "./schema/fanavaran-auth-token.schema";
import {
FanavaranClientConfig,
FanavaranClientConfigSchema,
} from "./schema/fanavaran-client-config.schema";
@Module({
imports: [
HttpModule.registerAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: createHttpModuleOptions,
}),
MongooseModule.forFeature([
{ name: FanavaranAuthToken.name, schema: FanavaranAuthTokenSchema },
{
name: FanavaranClientConfig.name,
schema: FanavaranClientConfigSchema,
},
{ name: LookupModel.name, schema: LookupSchema },
{ name: BranchModel.name, schema: BranchSchema },
]),
FanavaranAuditModule,
UsersModule,
],
providers: [
BranchDbService,
FanavaranClientConfigService,
FanavaranAuthService,
FanavaranLookupService,
FanavaranLocationService,
],
exports: [
FanavaranClientConfigService,
FanavaranAuthService,
FanavaranLookupService,
FanavaranLocationService,
],
})
export class FanavaranLookupModule {}