Files
tessera-ctl/apps/api/src/tenders/tenders.seed.ts
T
schalli e7b40946c8 feat(10-02): register TendersModule with marketplace self-seed + singleton poll config
- tenders.seed.ts seeds slug 'tender-radar' (isSystem: true, category 'procurement')
- tenders.module.ts self-seeds registry on boot (mirrors DkvModule pattern)
- upserts singleton doe-opendata TenderSourcePollConfig row (global, no forTenant())
- TendersModule added to app.module.ts imports
2026-07-21 10:42:44 +02:00

27 lines
883 B
TypeScript

import { ModuleRegistryService } from '../module-registry/module-registry.service';
/**
* Seeds the tender-radar module into the module registry.
*
* Called during TendersModule initialization to ensure the
* "tender-radar" module record exists in the database (CONFIG-01).
*
* isSystem: true registers the module in the registry but does NOT
* auto-activate it per tenant. Admin must activate via Marketplace UI.
*/
export async function seedTendersModule(
moduleRegistryService: ModuleRegistryService,
): Promise<void> {
await moduleRegistryService.seedModule({
slug: 'tender-radar',
name: 'Ausschreibungs-Radar',
version: '1.0.0',
category: 'procurement',
description: {
de: 'Deutsche Ausschreibungen automatisch erfassen und durchsuchen',
en: 'Automatically track and search German public tenders',
},
isSystem: true,
});
}