diff --git a/App/prisma/seed-prod.ts b/App/prisma/seed-prod.ts index 794cb03..80b7f48 100644 --- a/App/prisma/seed-prod.ts +++ b/App/prisma/seed-prod.ts @@ -82,6 +82,50 @@ const VESSELS: { code: string; name: string }[] = [ { name: "GD3000", code: "GD30" }, ]; +// ─── Companies ─────────────────────────────────────────────────────────────── + +type CompanyEntry = { + code: string; name: string; gstNumber: string; + address: string; telephone: string; mobile: string; + email: string; invoiceEmail: string; invoiceAddress: string; +}; + +const COMPANIES: CompanyEntry[] = [ + { + code: "PMS", + name: "Pelagia Marine Services Pvt Ltd", + gstNumber: "27AAHCP5787B1Z6", + address: "409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210", + telephone: "+91-22-6909 9028", + mobile: "+91 74000 60772", + email: "technical@pelagiamarine.com", + invoiceEmail: "accounts@pelagiamarine.com", + invoiceAddress: "Pelagia Marine Services Pvt Ltd, 409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210 (MH)", + }, + { + code: "HNR", + name: "H&R Offshore Pvt Ltd", + gstNumber: "27AAECH2810G1ZX", + address: "409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210", + telephone: "+91-22-6909 9028", + mobile: "+91 74000 60772", + email: "technical@pelagiamarine.com", + invoiceEmail: "accounts@pelagiamarine.com", + invoiceAddress: "H&R Offshore Pvt Ltd, 409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210 (MH)", + }, + { + code: "DEI", + name: "Dredge Experts India Pvt Ltd", + gstNumber: "27AAGCD3114P1ZH", + address: "409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210", + telephone: "+91-22-6909 9028", + mobile: "+91 74000 60772", + email: "technical@pelagiamarine.com", + invoiceEmail: "accounts@pelagiamarine.com", + invoiceAddress: "Dredge Experts India Pvt Ltd, 409-410, ZION, Plot 273, Sector-10, Kharghar, Navi Mumbai- 410210 (MH)", + }, +]; + // ─── Main ───────────────────────────────────────────────────────────────────── async function main() { @@ -139,6 +183,25 @@ async function main() { console.log(` ✓ ${v.name} (${v.code})`); } + // ── Companies ────────────────────────────────────────────────────────────── + console.log("\n🏢 Seeding companies…"); + for (const c of COMPANIES) { + await db.company.upsert({ + where: { code: c.code }, + update: { + name: c.name, gstNumber: c.gstNumber, address: c.address, + telephone: c.telephone, mobile: c.mobile, email: c.email, + invoiceEmail: c.invoiceEmail, invoiceAddress: c.invoiceAddress, + }, + create: { + code: c.code, name: c.name, gstNumber: c.gstNumber, address: c.address, + telephone: c.telephone, mobile: c.mobile, email: c.email, + invoiceEmail: c.invoiceEmail, invoiceAddress: c.invoiceAddress, + }, + }); + console.log(` ✓ ${c.name} (${c.code})`); + } + // ── Accounting Codes ─────────────────────────────────────────────────────── console.log("\n📊 Seeding accounting codes…");