Files
MinglarBackendNestJS/prisma/seed.ts

842 lines
47 KiB
TypeScript

import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
// ✅ Countries
const india = await prisma.countries.upsert({
where: { countryName: 'India' },
update: {},
create: {
countryName: 'India',
countryCode: 'IN',
countryFlag: '🇮🇳',
isActive: true,
},
});
const usa = await prisma.countries.upsert({
where: { countryName: 'United States' },
update: {},
create: {
countryName: 'United States',
countryCode: 'US',
countryFlag: '🇺🇸',
isActive: true,
},
});
// ✅ Currencies
await prisma.currencies.createMany({
data: [
{ countryXid: india.id, currencyName: 'Indian Rupee', currencySymbol: '₹' },
{ countryXid: usa.id, currencyName: 'US Dollar', currencySymbol: '$' },
],
skipDuplicates: true,
});
// ✅ States
const maharashtra = await prisma.states.upsert({
where: { stateName: 'Maharashtra' },
update: {},
create: { countryXid: india.id, stateName: 'Maharashtra' },
});
const california = await prisma.states.upsert({
where: { stateName: 'California' },
update: {},
create: { countryXid: usa.id, stateName: 'California' },
});
// ✅ Cities
await prisma.cities.createMany({
data: [
{ stateXid: maharashtra.id, cityName: 'Mumbai' },
{ stateXid: california.id, cityName: 'Los Angeles' },
],
skipDuplicates: true,
});
// ✅ Taxes
await prisma.taxes.createMany({
data: [
{ countryXid: india.id, taxName: 'GST', taxPer: 18 },
{ countryXid: usa.id, taxName: 'VAT', taxPer: 10 },
],
skipDuplicates: true,
});
// ✅ Banks
const hdfc = await prisma.banks.upsert({
where: { bankName: 'HDFC Bank' },
update: {},
create: { countryXid: india.id, bankName: 'HDFC Bank' },
});
const chase = await prisma.banks.upsert({
where: { bankName: 'Chase Bank' },
update: {},
create: { countryXid: usa.id, bankName: 'Chase Bank' },
});
// ✅ Bank Branches
await prisma.bankBranches.createMany({
data: [
{
bankXid: hdfc.id,
stateXid: maharashtra.id,
cityXid: (await prisma.cities.findFirst({ where: { cityName: 'Mumbai' } }))!.id,
branchAddress: 'HDFC Fort Branch, Mumbai',
ifscCode: 'HDFC0001234',
},
{
bankXid: chase.id,
stateXid: california.id,
cityXid: (await prisma.cities.findFirst({ where: { cityName: 'Los Angeles' } }))!.id,
branchAddress: 'Chase Downtown LA',
ifscCode: 'CHASUS12345',
},
],
skipDuplicates: true,
});
// ✅ Interests + Activity Types
const chillandzen = await prisma.interests.upsert({
where: { interestName: 'Chill and Zen' },
update: {},
create: { interestName: 'Chill and Zen', displayOrder: 1 },
});
const sweatmode = await prisma.interests.upsert({
where: { interestName: 'Sweat Mode' },
update: {},
create: { interestName: 'Sweat Mode', displayOrder: 2 },
});
const gameon = await prisma.interests.upsert({
where: { interestName: 'Game On' },
update: {},
create: { interestName: 'Game On', displayOrder: 3 },
});
const partycentral = await prisma.interests.upsert({
where: { interestName: 'Party Central' },
update: {},
create: { interestName: 'Party Central', displayOrder: 4 },
});
const artsy = await prisma.interests.upsert({
where: { interestName: 'Artsy' },
update: {},
create: { interestName: 'Artsy', displayOrder: 5 },
});
const foodiediaries = await prisma.interests.upsert({
where: { interestName: 'Foodie Diaries' },
update: {},
create: { interestName: 'Foodie Diaries', displayOrder: 6 },
});
await prisma.activityTypes.createMany({
data: [
{ interestXid: chillandzen.id, activityTypeName: 'Cricket' },
{ interestXid: chillandzen.id, activityTypeName: 'Football' },
],
skipDuplicates: true,
});
// ✅ Document Types
await prisma.documentType.createMany({
data: [
{ documentTypeName: 'GST Certificate', displayOrder: 1 },
{ documentTypeName: 'PAN / BIN Card', displayOrder: 2 },
{ documentTypeName: 'Registration Certification', displayOrder: 3 },
{ documentTypeName: 'Aadhaar Card', displayOrder: 4 },
{ documentTypeName: 'Fire Insurance', displayOrder: 5 },
{ documentTypeName: 'ATOAI Certification', displayOrder: 6 },
{ documentTypeName: 'FASSI Certification', displayOrder: 7 },
{ documentTypeName: 'Safety Certification', displayOrder: 8 },
{ documentTypeName: 'Others', displayOrder: 9 },
],
skipDuplicates: true,
});
// ✅ Amenities
await prisma.amenities.createMany({
data: [
{ amenitiesName: 'Wi-Fi' },
{ amenitiesName: 'Air Conditioner' },
{ amenitiesName: 'Phone Charger' },
{ amenitiesName: 'Mobile Network' },
],
skipDuplicates: true, // prevents error if already seeded
});
// ✅ Food Types
await prisma.foodTypes.createMany({
data: [
{ foodTypeName: 'Veg' },
{ foodTypeName: 'Non-Veg' },
{ foodTypeName: 'Vegan' },
{ foodTypeName: 'Jain' },
],
skipDuplicates: true,
});
// ✅ AGE RESTRICTIONS
await prisma.ageRestrictions.createMany({
data: [
{ ageRestrictionName: 'Below 18', minAge: 1, maxAge: 17 },
{ ageRestrictionName: 'Above 18', minAge: 18, maxAge: 200 },
],
skipDuplicates: true,
});
// ✅ ALLOWED ENTRY TYPES
await prisma.allowedEntryTypes.createMany({
data: [
{ allowedEntryTypeName: 'Solo' },
{ allowedEntryTypeName: 'Couple' },
{ allowedEntryTypeName: 'Group' },
],
skipDuplicates: true,
});
// ✅ ROLES
await prisma.roles.createMany({
data: [
{ roleName: 'Admin' },
{ roleName: 'Co_Admin' },
{ roleName: 'Account_Manager' },
{ roleName: 'Host' },
{ roleName: 'Operator' },
{ roleName: 'User' },
],
skipDuplicates: true,
});
// ✅ Frequencies
await prisma.frequencies.createMany({
data: [
{ frequencyName: 'Single Event' },
{ frequencyName: 'Multiple Events Per Day' },
{ frequencyName: 'Training' },
],
skipDuplicates: true,
});
// ✅ Navigation Modes
await prisma.navigationModes.createMany({
data: [
{ navigationModeName: 'Elephant Ride', navigationModeIcon: '🚗' },
{ navigationModeName: 'Horse Ride', navigationModeIcon: '🏍️' },
{ navigationModeName: 'Camel Ride', navigationModeIcon: '🚶' },
],
skipDuplicates: true,
});
// ✅ Transport Modes
await prisma.transportModes.createMany({
data: [
{ transportModeName: 'Open Jeep / Car / SUV - 4 seater', transportModeIcon: '🚌' },
{ transportModeName: 'Open Jeep / Car / SUV - 6 seater', transportModeIcon: '🚌' },
{ transportModeName: '4W Jeep / SUV - 4 seater', transportModeIcon: '🚆' },
{ transportModeName: '4W Jeep / SUV - 6 seater', transportModeIcon: '🚆' },
],
skipDuplicates: true,
});
// ✅ PQQ Categories + Questions + Answers
// const PQQCategories = await prisma.pQQCategories.upsert({
// where: { categoryName: "Sustainability" },
// update: {},
// create: {
// categoryName: "Sustainability",
// displayOrder: 1,
// isActive: true,
// pqqsubCategories: {
// create: [
// // -----------------------------------------------------
// // SUBCATEGORY 1: Environmental Practices
// // -----------------------------------------------------
// {
// subCategoryName: "Environmental Practices",
// displayOrder: 1,
// isActive: true,
// questions: {
// create: [
// // QUESTION 1
// {
// questionName: 'What waste management practices do you have in place to minimize environmental impact? Examples: Recycling bins, composting organic waste, reducing single-use plastics.',
// maxPoints: 10,
// displayOrder: 1,
// PQQAnswers: {
// create: [
// { answerName: 'We do not have specific waste management practices.', answerPoints: 0, displayOrder: 1 },
// { answerName: 'We separate waste and recycle basic items like paper and plastic.', answerPoints: 5, displayOrder: 2 },
// { answerName: 'We have a comprehensive recycling program including composting organic waste.', answerPoints: 8, displayOrder: 3 },
// { answerName: 'We actively reduce waste at the source and partner with local recycling organizations.', answerPoints: 10, displayOrder: 4 },
// ],
// },
// },
// // QUESTION 2
// {
// questionName: 'Can you provide examples of energy-efficient appliances or renewable energy sources you use? Examples: Solar panels, energy-efficient lighting, renewable energy certificates.',
// maxPoints: 10,
// displayOrder: 2,
// PQQAnswers: {
// create: [
// { answerName: 'We do not use energy-efficient appliances or renewable energy sources.', answerPoints: 0, displayOrder: 1 },
// { answerName: 'We use energy-efficient light bulbs and appliances.', answerPoints: 5, displayOrder: 2 },
// { answerName: 'We have solar panels and energy-efficient heating/cooling systems.', answerPoints: 8, displayOrder: 3 },
// { answerName: 'We utilize a combination of renewable energy sources and advanced energy-saving technologies.', answerPoints: 10, displayOrder: 4 },
// ],
// },
// },
// {
// questionName: 'What measures do you take to conserve water? Examples: Low-flow fixtures, rainwater harvesting, greywater recycling.',
// maxPoints: 10,
// displayOrder: 3,
// PQQAnswers: {
// create: [
// { answerName: 'We do not have specific water conservation measures.', answerPoints: 0, displayOrder: 1 },
// { answerName: 'We encourage guests to limit water use.', answerPoints: 5, displayOrder: 2 },
// { answerName: 'We have low-flow fixtures and water-saving appliances installed.', answerPoints: 8, displayOrder: 3 },
// { answerName: 'We implement rainwater harvesting and greywater recycling systems.', answerPoints: 10, displayOrder: 4 },
// ],
// },
// },
// {
// questionName: 'How do you monitor and reduce your carbon footprint? Examples: Carbon audits, offsetting emissions, energy-saving initiatives.',
// maxPoints: 10,
// displayOrder: 4,
// PQQAnswers: {
// create: [
// { answerName: 'We do not monitor or take steps to reduce our carbon footprint.', answerPoints: 0, displayOrder: 1 },
// { answerName: 'We track our energy usage and try to minimize it.', answerPoints: 5, displayOrder: 2 },
// { answerName: 'We have set carbon reduction targets and regularly monitor our progress.', answerPoints: 8, displayOrder: 3 },
// { answerName: 'We offset our carbon emissions through verified programs and continually improve our sustainability practices.', answerPoints: 10, displayOrder: 4 },
// ],
// },
// },
// {
// questionName: 'Do you source products and materials sustainably? Can you provide examples? Examples: Local, organic, fair-trade products.',
// maxPoints: 10,
// displayOrder: 5,
// PQQAnswers: {
// create: [
// { answerName: 'We do not prioritize sustainable sourcing.', answerPoints: 0, displayOrder: 1 },
// { answerName: 'We source some products locally and sustainably.', answerPoints: 5, displayOrder: 2 },
// { answerName: 'We prioritize local, organic, and fair-trade products.', answerPoints: 8, displayOrder: 3 },
// { answerName: 'We have strict sourcing policies that ensure all products are sustainable and ethically produced.', answerPoints: 10, displayOrder: 4 },
// ],
// },
// },
// ]
// }
// },
// // -----------------------------------------------------
// // SUBCATEGORY 2: Community Impact
// // -----------------------------------------------------
// {
// subCategoryName: "Community Impact",
// displayOrder: 2,
// isActive: true,
// questions: {
// create: [
// // QUESTION 1
// {
// questionName:
// "How do you support local employment and engage with the community? Examples: Hiring local staff, partnering with community organizations, participating in local events.",
// maxPoints: 10,
// displayOrder: 1,
// PQQAnswers: {
// create: [
// { answerName: "We do not have specific practices to support local employment or community engagement.", answerPoints: 0, displayOrder: 1 },
// { answerName: "We hire local staff but do not have formal community engagement programs.", answerPoints: 5, displayOrder: 2 },
// { answerName: "We actively employ local residents and participate in community events.", answerPoints: 8, displayOrder: 3 },
// { answerName: "We have partnerships with local organizations and invest in community development projects.", answerPoints: 10, displayOrder: 4 }
// ]
// }
// },
// // QUESTION 2
// {
// questionName:
// "Are you involved in any community projects or cultural preservation activities? Examples: Supporting local artisans, sponsoring cultural festivals, contributing to community development.",
// maxPoints: 10,
// displayOrder: 2,
// PQQAnswers: {
// create: [
// { answerName: "We are not involved in any community or cultural preservation projects.", answerPoints: 0, displayOrder: 1 },
// { answerName: "We support community projects through donations.", answerPoints: 5, displayOrder: 2 },
// { answerName: "We participate in and organize community events and cultural preservation activities.", answerPoints: 8, displayOrder: 3 },
// { answerName: "We lead major community development initiatives and cultural preservation projects.", answerPoints: 10, displayOrder: 4 }
// ]
// }
// },
// // QUESTION 3
// {
// questionName:
// "Can you provide examples of how your business benefits the local community? Examples: Providing jobs, sourcing local products, investing in local infrastructure.",
// maxPoints: 10,
// displayOrder: 3,
// PQQAnswers: {
// create: [
// { answerName: "We do not have specific examples.", answerPoints: 0, displayOrder: 1 },
// { answerName: "We provide employment opportunities for local residents.", answerPoints: 5, displayOrder: 2 },
// { answerName: "We support local businesses by sourcing products and services locally.", answerPoints: 8, displayOrder: 3 },
// { answerName: "We invest in local infrastructure and educational programs.", answerPoints: 10, displayOrder: 4 }
// ]
// }
// },
// ]
// }
// },
// // -----------------------------------------------------
// //SUBCATEGORY 3 : Sustainable Tourism Certification
// // -----------------------------------------------------
// {
// subCategoryName: "Sustainable Tourism Certification",
// displayOrder: 2,
// isActive: true,
// questions: {
// create: [
// // QUESTION 1
// {
// questionName:
// "Do you have any recognized sustainable tourism certifications (e.g., Green Globe, EarthCheck, Travelife)? Please provide details. Examples: Certification names and details, certificates.",
// maxPoints: 10,
// displayOrder: 1,
// PQQAnswers: {
// create: [
// { answerName: "We do not have any sustainable tourism certifications.", answerPoints: 0, displayOrder: 1 },
// { answerName: "We are in the process of obtaining a certification.", answerPoints: 5, displayOrder: 2 },
// { answerName: "We have one recognized sustainable tourism certification.", answerPoints: 8, displayOrder: 3 },
// { answerName: "We hold multiple recognized sustainable tourism certifications and regularly audit our practices.", answerPoints: 10, displayOrder: 4 }
// { answerName: "Not applicable", answerPoints: 0, displayOrder: 5 }
// ]
// }
// }
// ]
// }
// },
// ]
// }
// },
// include: {
// pqqsubCategories: {
// include: {
// questions: {
// include: {
// PQQAnswers: true
// }
// }
// }
// }
// }
// });
const categoriesData = [
{
categoryName: "Sustainability",
displayOrder: 1,
isActive: true,
subCategories: [
// -----------------------------------------------------
// SUBCATEGORY 1: Environmental Practices
// -----------------------------------------------------
{
subCategoryName: "Environmental Practices",
displayOrder: 1,
isActive: true,
questions: [
// QUESTION 1
{
questionName: 'What waste management practices do you have in place to minimize environmental impact? Examples: Recycling bins, composting organic waste, reducing single-use plastics.',
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: 'We do not have specific waste management practices.', points: 0 },
{ name: 'We separate waste and recycle basic items like paper and plastic.', points: 5 },
{ name: 'We have a comprehensive recycling program including composting organic waste.', points: 8 },
{ name: 'We actively reduce waste at the source and partner with local recycling organizations.', points: 10 },
],
},
// QUESTION 2
{
questionName: 'Can you provide examples of energy-efficient appliances or renewable energy sources you use? Examples: Solar panels, energy-efficient lighting, renewable energy certificates.',
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: 'We do not use energy-efficient appliances or renewable energy sources.', points: 0 },
{ name: 'We use energy-efficient light bulbs and appliances.', points: 5 },
{ name: 'We have solar panels and energy-efficient heating/cooling systems.', points: 8 },
{ name: 'We utilize a combination of renewable energy sources and advanced energy-saving technologies.', points: 10 },
],
},
{
questionName: 'What measures do you take to conserve water? Examples: Low-flow fixtures, rainwater harvesting, greywater recycling.',
maxPoints: 10,
displayOrder: 3,
answers: [
{ name: 'We do not have specific water conservation measures.', points: 0 },
{ name: 'We encourage guests to limit water use.', points: 5 },
{ name: 'We have low-flow fixtures and water-saving appliances installed.', points: 8 },
{ name: 'We implement rainwater harvesting and greywater recycling systems.', points: 10 },
],
},
{
questionName: 'How do you monitor and reduce your carbon footprint? Examples: Carbon audits, offsetting emissions, energy-saving initiatives.',
maxPoints: 10,
displayOrder: 4,
answers: [
{ name: 'We do not monitor or take steps to reduce our carbon footprint.', points: 0 },
{ name: 'We track our energy usage and try to minimize it.', points: 5 },
{ name: 'We have set carbon reduction targets and regularly monitor our progress.', points: 8 },
{ name: 'We offset our carbon emissions through verified programs and continually improve our sustainability practices.', points: 10 },
],
},
{
questionName: 'Do you source products and materials sustainably? Can you provide examples? Examples: Local, organic, fair-trade products.',
maxPoints: 10,
displayOrder: 5,
answers: [
{ name: 'We do not prioritize sustainable sourcing.', points: 0 },
{ name: 'We source some products locally and sustainably.', points: 5 },
{ name: 'We prioritize local, organic, and fair-trade products.', points: 8 },
{ name: 'We have strict sourcing policies that ensure all products are sustainable and ethically produced.', points: 10 },
],
},
]
},
// -----------------------------------------------------
// SUBCATEGORY 2: Community Impact
// -----------------------------------------------------
{
subCategoryName: "Community Impact",
displayOrder: 2,
isActive: true,
questions: [
// QUESTION 1
{
questionName:
"How do you support local employment and engage with the community? Examples: Hiring local staff, partnering with community organizations, participating in local events.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have specific practices to support local employment or community engagement.", points: 0 },
{ name: "We hire local staff but do not have formal community engagement programs.", points: 5 },
{ name: "We actively employ local residents and participate in community events.", points: 8 },
{ name: "We have partnerships with local organizations and invest in community development projects.", points: 10 }
]
},
// QUESTION 2
{
questionName:
"Are you involved in any community projects or cultural preservation activities? Examples: Supporting local artisans, sponsoring cultural festivals, contributing to community development.",
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: "We are not involved in any community or cultural preservation projects.", points: 0 },
{ name: "We support community projects through donations.", points: 5 },
{ name: "We participate in and organize community events and cultural preservation activities.", points: 8 },
{ name: "We lead major community development initiatives and cultural preservation projects.", points: 10 }
]
},
// QUESTION 3
{
questionName:
"Can you provide examples of how your business benefits the local community? Examples: Providing jobs, sourcing local products, investing in local infrastructure.",
maxPoints: 10,
displayOrder: 3,
answers: [
{ name: "We do not have specific examples.", points: 0 },
{ name: "We provide employment opportunities for local residents.", points: 5 },
{ name: "We support local businesses by sourcing products and services locally.", points: 8 },
{ name: "We invest in local infrastructure and educational programs.", points: 10 }
]
},
]
},
// -----------------------------------------------------
//SUBCATEGORY 3 : Sustainable Tourism Certification
// -----------------------------------------------------
{
subCategoryName: "Sustainable Tourism Certification",
displayOrder: 3,
isActive: true,
questions: [
// QUESTION 1
{
questionName:
"Do you have any recognized sustainable tourism certifications (e.g., Green Globe, EarthCheck, Travelife)? Please provide details. Examples: Certification names and details, certificates.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have any sustainable tourism certifications.", points: 0 },
{ name: "We are in the process of obtaining a certification.", points: 5 },
{ name: "We have one recognized sustainable tourism certification.", points: 8 },
{ name: "We hold multiple recognized sustainable tourism certifications and regularly audit our practices.", points: 10 },
{ name: "Not applicable.", points: 0 }
]
}
]
},
]
},
// ----------------------------------------
// ADD MORE CATEGORIES HERE
// Example:
// ----------------------------------------
{
categoryName: "Safety",
displayOrder: 2,
subCategories: [
{
subCategoryName: "General Safety Protocols",
displayOrder: 1,
questions: [
{
questionName: "What safety measures do you have in place for your activities? Examples: Safety briefings, emergency exits, safety equipment.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have specific safety measures.", points: 0 },
{ name: "We provide basic safety information and equipment.", points: 5 },
{ name: "We have comprehensive safety measures, including briefings and equipment checks.", points: 8 },
{ name: "We follow strict safety protocols and conduct regular drills and equipment inspections.", points: 10 }
]
},
{
questionName: "Can you describe your emergency response plan? Examples: Evacuation procedures, emergency contact numbers, first aid kits.",
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: "We do not have an emergency response plan.", points: 0 },
{ name: "We have a basic plan but do not conduct regular drills.", points: 5 },
{ name: "We have a detailed plan and conduct regular emergency drills.", points: 8 },
{ name: "We have a comprehensive emergency response plan, regularly updated and practiced.", points: 10 }
]
}
]
},
{
subCategoryName: "Staff Training",
displayOrder: 2,
questions: [
{
questionName: "How often do you conduct safety training and drills? Examples: Annual training sessions, quarterly drills, surprise inspections.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not conduct regular safety training or drills.", points: 0 },
{ name: "We conduct safety training and drills occasionally.", points: 5 },
{ name: "We conduct safety training and drills annually.", points: 8 },
{ name: "We conduct safety training and drills multiple times a year.", points: 10 }
]
}
]
},
{
subCategoryName: "Emergency Evacuation Procedures",
displayOrder: 3,
questions: [
{
questionName: "Do you have clear, well-communicated emergency evacuation procedures in place for guests, including those with injuries or mobility issues? Examples: Evacuation maps in guest rooms, staff trained to assist injured guests during emergencies.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "No emergency evacuation procedures are in place.", points: 0 },
{ name: "Basic evacuation procedures are in place, but they may not fully address guests with injuries or mobility issues.", points: 5 },
{ name: "Evacuation procedures are in place and communicated to guests, with some provisions for those with injuries or mobility issues.", points: 8 },
{ name: "Well-defined and regularly practiced evacuation procedures are in place, with specific provisions for assisting guests with injuries or mobility issues.", points: 10 }
]
}
]
},
{
subCategoryName: "Safety in Areas with Criminal Activity",
displayOrder: 4,
questions: [
{
questionName: "How do you ensure the safety of travelers in areas with a risk of robberies or other personal safety concerns? Examples: Security measures, partnerships with local law enforcement, guest advisories.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have specific measures for traveler safety in such areas.", points: 0 },
{ name: "We provide basic safety advice to travelers about risky areas.", points: 5 },
{ name: "We have partnerships with local law enforcement and provide detailed safety advisories to travelers.", points: 8 },
{ name: "We implement comprehensive safety measures, including security personnel, secure transportation options, and close collaboration with local authorities.", points: 10 }
]
},
{
questionName: "What measures are in place to prevent incidents related to criminal activity during your activities? Examples: Curfew policies, guided tours only in safe areas, emergency contact numbers.",
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: "We do not have specific measures to prevent such incidents.", points: 0 },
{ name: "We avoid operating in high-risk areas but do not have formal measures.", points: 5 },
{ name: "We restrict our activities to safe areas and have protocols for handling emergencies.", points: 8 },
{ name: "We conduct thorough risk assessments, restrict activities to safe times and areas, and provide secure transportation and 24/7 emergency support.", points: 10 },
{ name: "Not applicable.", points: 0 }
]
},
]
},
{
subCategoryName: "Safety of Transportation",
displayOrder: 5,
questions: [
{
questionName: "How do you ensure the safety of travelers during transportation from the nearest airport, train or bus station to your destination? Examples: Verified transportation providers, secure pickup points, real-time monitoring.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have specific measures for transportation safety.", points: 0 },
{ name: "We provide basic advice on safe transportation options.", points: 5 },
{ name: "We use verified transportation providers and secure pickup points.", points: 8 },
{ name: "We offer comprehensive transportation safety measures, including verified providers, secure pickup points, and real-time monitoring.", points: 10 }
]
},
{
questionName: "What measures are in place to ensure the safety of travelers in cabs or rickshaws arranged by your service? Examples: Driver background checks, vehicle safety checks, GPS tracking.",
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: "We do not have specific measures for cab or rickshaw safety.", points: 0 },
{ name: "We recommend trusted local transportation services.", points: 5 },
{ name: "We conduct driver background checks and ensure vehicle safety.", points: 8 },
{ name: "We implement extensive measures, including driver background checks, vehicle safety checks, and GPS tracking.", points: 10 },
{ name: "Not applicable as we do not arrange cabs or rickshaws for the travellers.", points: 0 }
]
},
{
questionName: "Do you provide any emergency contact or support during transportation for travelers? Examples: 24/7 helpline, emergency response team, real-time communication.",
maxPoints: 10,
displayOrder: 3,
answers: [
{ name: "We do not provide specific emergency contact or support during transportation.", points: 0 },
{ name: "We provide a contact number for emergency use.", points: 5 },
{ name: "We conduct driver background checks and ensure vehicle safety.", points: 8 },
{ name: "We implement extensive measures, including driver background checks, vehicle safety checks, and GPS tracking.", points: 10 },
{ name: "Not applicable.", points: 0 }
]
},
]
},
{
subCategoryName: "Safety in Areas with Wild Animals",
displayOrder: 6,
questions: [
{
questionName: "How do you ensure the safety of travelers in areas where wild animals are known to roam? Examples: Wildlife awareness programs, guided tours, safety briefings.",
maxPoints: 10,
displayOrder: 1,
answers: [
{ name: "We do not have specific measures for wildlife safety.", points: 0 },
{ name: "We provide basic advice to travelers about wildlife safety.", points: 5 },
{ name: "We conduct guided tours with trained personnel and provide detailed safety briefings.", points: 8 },
{ name: "We implement comprehensive wildlife safety measures, including trained guides, safety equipment, and collaboration with wildlife experts.", points: 10 },
{ name: "Not applicable.", points: 10 }
]
},
{
questionName: "What precautions do you take to minimize the risk of wildlife encounters during activities? Examples: Activity scheduling, designated safe areas, wildlife monitoring.",
maxPoints: 10,
displayOrder: 2,
answers: [
{ name: "We do not take specific precautions for wildlife encounters.", points: 0 },
{ name: "We provide information on wildlife safety but do not take specific precautions.", points: 5 },
{ name: "We schedule activities to avoid high-risk times and monitor wildlife activity.", points: 8 },
{ name: "We have strict protocols, including avoiding high-risk areas and times, using designated safe zones, and employing wildlife monitoring systems.", points: 10 },
{ name: "Not applicable.", points: 0 }
]
},
{
questionName: "Do you provide training for your staff to handle wildlife encounters safely? Examples: Wildlife behavior training, emergency procedures, use of safety equipment.",
maxPoints: 10,
displayOrder: 3,
answers: [
{ name: "Our staff do not receive specific training for wildlife encounters.", points: 0 },
{ name: "Some staff have basic training on wildlife safety.", points: 5 },
{ name: "Most staff are trained to handle wildlife encounters and know emergency procedures.", points: 8 },
{ name: "All staff receive comprehensive training, including wildlife behavior, emergency response, and the use of safety equipment.", points: 10 },
{ name: "Not applicable.", points: 0 }
]
},
]
},
]
}
];
for (const category of categoriesData) {
await prisma.pQQCategories.upsert({
where: { categoryName: category.categoryName },
update: {},
create: {
categoryName: category.categoryName,
displayOrder: category.displayOrder,
isActive: true,
pqqsubCategories: {
create: category.subCategories.map((sub) => ({
subCategoryName: sub.subCategoryName,
displayOrder: sub.displayOrder,
isActive: true,
questions: {
create: sub.questions.map((q) => ({
questionName: q.questionName,
maxPoints: q.maxPoints,
displayOrder: q.displayOrder,
PQQAnswers: {
create: q.answers.map((ans, i) => ({
answerName: ans.name,
answerPoints: ans.points,
displayOrder: i + 1
}))
}
}))
}
}))
}
}
});
}
console.log('✅ Seed data inserted successfully!');
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});