"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const client_1 = require("@prisma/client");
const prisma = new client_1.PrismaClient();
async function main() {
    console.log('Seeding Shipping Providers Settings...');
    const providers = [
        {
            providerName: 'SHIPROCKET',
            displayName: 'Shiprocket Delivery Services',
            isEnabled: true,
            environment: 'sandbox',
            apiEmail: 'sandbox@shiprocket.com',
            apiPassword: 'secret_password_here',
            warehouseName: 'Main Mumbai Warehouse',
            warehouseAddress: 'Building 12, Kalina Industrial Area, Santacruz, Mumbai',
            contactPerson: 'Rahul Kumar',
            phone: '9876543210',
            pincode: '400098',
            priority: 1,
            defaultProvider: true,
        },
        {
            providerName: 'MANUAL',
            displayName: 'Manual / Self Shipping Despatch',
            isEnabled: true,
            environment: 'sandbox',
            warehouseName: 'Central Bengaluru Hub',
            warehouseAddress: '42, Brigade Road, Ashok Nagar, Bengaluru',
            contactPerson: 'Srinivas Murthy',
            phone: '8022345678',
            pincode: '560001',
            priority: 2,
            defaultProvider: false,
        },
    ];
    for (const p of providers) {
        await prisma.shippingProvider.upsert({
            where: { providerName: p.providerName },
            update: {},
            create: p,
        });
    }
    console.log('Shipping Providers seeded successfully!');
}
main()
    .catch((e) => {
    console.error(e);
    process.exit(1);
})
    .finally(async () => {
    await prisma.$disconnect();
});
//# sourceMappingURL=seed-shipping-providers.js.map