""" FAQ Page Seeder Seeds the database with comprehensive FAQ content """ import json import sys from pathlib import Path from datetime import datetime, timezone # Add parent directory to path to allow importing from src sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from sqlalchemy.orm import Session from src.shared.config.database import SessionLocal from src.shared.config.logging_config import get_logger from src.content.models.page_content import PageContent, PageType # Import all models to ensure relationships are loaded from src.models import * logger = get_logger(__name__) def get_faq_page_data(): """Generate comprehensive FAQ page data""" now = datetime.now(timezone.utc) return { 'page_type': PageType.FAQ, 'title': 'Frequently Asked Questions', 'subtitle': 'Find Answers to Common Questions', 'description': 'Get answers to the most frequently asked questions about our hotel, reservations, services, and policies.', 'content': """
Check-in time is 3:00 PM, and check-out time is 11:00 AM. Early check-in and late check-out may be available upon request, subject to availability and additional charges.
Yes, we offer airport transfer services. Please contact our concierge team at least 24 hours in advance to arrange transportation. Additional charges may apply.
Yes, we offer complimentary valet parking for all hotel guests. Self-parking is also available at an additional charge.
Yes, our state-of-the-art fitness center is open 24/7 and is complimentary for all hotel guests. We also offer personal training sessions upon request.
Yes, complimentary high-speed Wi-Fi is available throughout the hotel, including all guest rooms and public areas.
You can make a reservation through our website, by calling our reservations team at +1 (555) 123-4567, or by emailing reservations@luxuryhotel.com.
Yes, you can modify or cancel your reservation through our website or by contacting our reservations team. Please refer to our cancellation policy for details on refunds and fees.
We accept all major credit cards (Visa, MasterCard, American Express, Discover), debit cards, and bank transfers. Cash payments are also accepted at check-in.
A credit card is required to guarantee your reservation. A deposit may be required for certain room types or during peak seasons. Details will be provided at the time of booking.
Yes, you can make a reservation for another guest. Please provide the guest's name and contact information at the time of booking, and ensure they have a valid ID for check-in.
All rooms include complimentary Wi-Fi, flat-screen TV, minibar, coffee maker, in-room safe, air conditioning, and luxury toiletries. Suites include additional amenities such as separate living areas and premium services.
Yes, we have connecting rooms available. Please request connecting rooms at the time of booking, and we will do our best to accommodate your request based on availability.
Yes, we have accessible rooms designed to meet ADA requirements. Please inform us of any specific accessibility needs when making your reservation.
Yes, you can request a specific room or floor preference. While we cannot guarantee specific rooms, we will do our best to honor your request based on availability.
We welcome service animals. For pets, please contact us in advance as pet-friendly rooms are limited and additional charges may apply.
Yes, we have a world-class spa offering a variety of treatments. Advance reservations are recommended. Please contact our spa directly to book treatments.
Yes, we have multiple dining options including fine dining, casual restaurants, and room service available 24/7. Our restaurants feature award-winning cuisine and extensive wine selections.
Yes, room service is available 24 hours a day. Our extensive menu includes breakfast, lunch, dinner, and late-night options.
Yes, our business center is equipped with computers, printers, and meeting facilities. It is available 24/7 for all guests.
Yes, we have versatile meeting and event spaces suitable for conferences, weddings, and other special occasions. Please contact our events team for more information.
Cancellation policies vary by rate type and booking. Generally, cancellations made 24-48 hours before check-in are free. Please refer to your booking confirmation for specific cancellation terms.
Our hotel is 100% non-smoking. Smoking is not permitted in any guest rooms or indoor public areas. Designated outdoor smoking areas are available.
Guests must be at least 18 years old to check in. Guests under 18 must be accompanied by an adult.
Yes, we maintain a lost and found department. If you have lost an item, please contact our front desk immediately. We will make every effort to locate and return your belongings.
Early check-in and late check-out are subject to availability. Please contact us in advance, and we will do our best to accommodate your request. Additional charges may apply.
Yes, we can accommodate various dietary requirements including vegetarian, vegan, gluten-free, and allergies. Please inform us of any dietary restrictions when making your reservation or dining reservation.
Absolutely! Our concierge team can help arrange special occasions such as anniversaries, birthdays, or proposals. Please contact us in advance to discuss your needs.
You can reach us by phone at +1 (555) 123-4567, email at info@luxuryhotel.com, or through our website's contact form. Our front desk is available 24/7.
Yes, we offer a loyalty program with exclusive benefits including room upgrades, late check-out, and special rates. Membership is free. Please visit our website or contact us for more information.
We value your feedback! You can leave a review on our website, through our post-stay survey, or by contacting our guest relations team directly.
""", 'meta_title': 'FAQ | Frequently Asked Questions - Luxury Hotel & Resort', 'meta_description': 'Find answers to frequently asked questions about reservations, rooms, services, and policies at Luxury Hotel & Resort.', 'meta_keywords': 'FAQ, frequently asked questions, hotel questions, booking questions, hotel policies, hotel information', 'og_title': 'FAQ - Luxury Hotel & Resort', 'og_description': 'Find answers to common questions about our hotel, reservations, and services.', 'og_image': 'https://images.unsplash.com/photo-1556761175-5973dc0f32e7?w=1200&h=630&fit=crop', 'canonical_url': 'https://luxuryhotel.com/faq', 'is_active': True, 'created_at': now, 'updated_at': now } def seed_faq_page(db: Session): """Seed FAQ page content into the database""" try: faq_data = get_faq_page_data() # Check if FAQ page content already exists existing_content = db.query(PageContent).filter(PageContent.page_type == PageType.FAQ).first() if existing_content: logger.info('Updating existing FAQ page content...') for key, value in faq_data.items(): if key not in ['id', 'page_type', 'created_at']: setattr(existing_content, key, value) existing_content.updated_at = datetime.now(timezone.utc) else: logger.info('Creating new FAQ page content...') faq_page = PageContent(**faq_data) db.add(faq_page) db.commit() logger.info('FAQ page content seeded successfully!') except Exception as e: db.rollback() logger.error(f'Error seeding FAQ page: {str(e)}', exc_info=True) raise def main(): db = SessionLocal() try: seed_faq_page(db) except Exception as e: logger.error(f'Failed to seed FAQ page: {str(e)}', exc_info=True) sys.exit(1) finally: db.close() if __name__ == '__main__': main()