feat: add government support to the companies. add seeding and constrain on booking

This commit is contained in:
Nathnael
2026-06-27 09:08:15 +00:00
parent 55c42058d0
commit 98e34593c4
14 changed files with 495 additions and 23 deletions

View File

@@ -0,0 +1,28 @@
import "reflect-metadata";
import { config } from "dotenv";
import { resolve } from "path";
config({ path: resolve(__dirname, "../../.env") });
import { NestFactory } from "@nestjs/core";
import { AppModule } from "../app.module";
import { GovCompaniesSeeder } from "../seed/gov-companies.seeder";
async function main() {
const app = await NestFactory.createApplicationContext(AppModule, {
logger: ["error", "warn", "log"],
});
try {
const seeder = app.get(GovCompaniesSeeder);
await seeder.run();
console.log("Government companies seeded.");
} finally {
await app.close();
}
}
main().catch((err) => {
console.error("Government companies seed failed:", err);
process.exit(1);
});