booking operations and trains scheduling also allocations

This commit is contained in:
marshal
2026-06-10 00:48:32 +03:00
parent 675975bc08
commit 5774d7db9d
180 changed files with 13423 additions and 3877 deletions

View File

@@ -0,0 +1,29 @@
import 'reflect-metadata';
import { config } from 'dotenv';
import { resolve } from 'path';
config({ path: resolve(__dirname, '../../.env') });
process.env.SEED_DEMO_BOOKINGS = 'true';
import { NestFactory } from '@nestjs/core';
import { AppModule } from '../app.module';
import { DemoBookingsSeeder } from '../seed/demo-bookings.seeder';
async function main() {
const app = await NestFactory.createApplicationContext(AppModule, {
logger: ['error', 'warn', 'log'],
});
try {
const seeder = app.get(DemoBookingsSeeder);
await seeder.run();
console.log('Demo train scheduling data seeded successfully.');
} finally {
await app.close();
}
}
main().catch((err) => {
console.error('Demo scheduling seed failed:', err);
process.exit(1);
});