diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bb2fcef..773b275 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -373,7 +373,6 @@ model DocumentType { documentTypeName String @unique @map("document_type_name") displayOrder Int? @map("display_order") isVisible Boolean @default(true) @map("is_visible") - displayOrder Int @map("display_order") isActive Boolean @default(true) @map("is_active") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") @@ -508,18 +507,18 @@ model PQQSubCategories { } model PQQQuestions { - id Int @id @default(autoincrement()) - pqqSubCategoryXid Int @map("pqq_sub_category_xid") - pqqSubCategories PQQSubCategories @relation(fields: [pqqSubCategoryXid], references: [id], onDelete: Cascade) - questionName String @unique @map("question_name") - maxPoints Int @map("max_points") - displayOrder Int @map("display_order") - isActive Boolean @default(true) @map("is_active") - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") - deletedAt DateTime? @map("deleted_at") - PQQAnswers PQQAnswers[] - ActivityPQQheader ActivityPQQheader[] + id Int @id @default(autoincrement()) + pqqSubCategoryXid Int @map("pqq_sub_category_xid") + pqqSubCategories PQQSubCategories @relation(fields: [pqqSubCategoryXid], references: [id], onDelete: Cascade) + questionName String @unique @map("question_name") + maxPoints Int @map("max_points") + displayOrder Int @map("display_order") + isActive Boolean @default(true) @map("is_active") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + deletedAt DateTime? @map("deleted_at") + PQQAnswers PQQAnswers[] + ActivityPQQheader ActivityPQQheader[] @@map("pqq_questions") @@schema("mst") diff --git a/prisma/seed.ts b/prisma/seed.ts index d3d9c75..dba0d0b 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -447,183 +447,160 @@ async function main() { displayOrder: 1, isActive: true, - pqqsubCategories: { - create: [ - // ----------------------------------------------------- - // SUBCATEGORY 1: Environmental Practices - // ----------------------------------------------------- - { - subCategoryName: "Environmental Practices", - displayOrder: 1, - isActive: true, + subCategories: [ + // ----------------------------------------------------- + // 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 }, - ], - }, - }, + 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, - 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 }, - ], - }, - }, + // 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 } ] } - }, + ] - // ----------------------------------------------------- - // 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 } - ] - } - } - ] - } - }, - ] - } + }, + ] }, // ---------------------------------------- @@ -644,12 +621,170 @@ async function main() { displayOrder: 1, answers: [ { name: "We do not have specific safety measures.", points: 0 }, - { name: "Basic fire extinguishers installed.", points: 5 }, - { name: "Full fire safety system installed.", points: 10 } + { 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 } + ] + }, + ] + }, ] }