rwadurian/backend/services/contribution-service/src/api/api.module.ts

31 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Module } from '@nestjs/common';
import { ApplicationModule } from '../application/application.module';
import { InfrastructureModule } from '../infrastructure/infrastructure.module';
import { ContributionController } from './controllers/contribution.controller';
import { SnapshotController } from './controllers/snapshot.controller';
import { HealthController } from './controllers/health.controller';
import { AdminController } from './controllers/admin.controller';
// [2026-03-04] 新增:预种卖出限制接口
import { PrePlantingRestrictionController } from './controllers/pre-planting-restriction.controller';
import { PrePlantingPrismaModule } from '../pre-planting/infrastructure/prisma/pre-planting-prisma.module';
import { SellRestrictionService } from '../pre-planting/application/services/sell-restriction.service';
@Module({
imports: [
ApplicationModule,
InfrastructureModule,
PrePlantingPrismaModule, // 提供 PrePlantingPrismaService用于 override 表)
],
controllers: [
ContributionController,
SnapshotController,
HealthController,
AdminController,
PrePlantingRestrictionController, // 预种卖出限制接口
],
providers: [
SellRestrictionService, // 预种卖出限制判断逻辑
],
})
export class ApiModule {}