import { Injectable, Logger, NotImplementedException } from '@nestjs/common';
import type { IngestTransactionsResponse } from '@pac/types';
import { PrismaService } from '../../prisma/prisma.service';
import type { TenantScopeContext } from '../../common/decorators/tenant-scope.decorator';
import type { IngestFactsRequestDto } from './dto/facts.dto';

/**
 * FactsService — `POST /facts:ingest` 兜底入口
 *
 * 暂未实施。数据入站走 cold-import + pull/push 三通道(详见 sync 模块);
 * 此端点仅留契约位,等业务确认是否需要独立 ingest API 再实施。
 */
@Injectable()
export class FactsService {
  private readonly logger = new Logger(FactsService.name);

  constructor(private readonly prisma: PrismaService) {}

  async ingest(
    _scope: TenantScopeContext,
    _request: IngestFactsRequestDto,
  ): Promise<IngestTransactionsResponse> {
    throw new NotImplementedException(
      '/facts:ingest 暂未实施,数据入站请走 cold-import / pull / push 三通道',
    );
  }
}
