@echo off
echo 🚀 Setting up Daily Quiz ^& Golden Card Feature...
echo.

REM Step 1: Generate Prisma Client
echo 📦 Step 1/4: Generating Prisma Client...
call npm run db:generate
if %errorlevel% neq 0 (
    echo ❌ Failed to generate Prisma client
    exit /b 1
)
echo ✅ Prisma client generated
echo.

REM Step 2: Push schema to database
echo 🗄️  Step 2/4: Pushing schema to database...
call npm run db:push
if %errorlevel% neq 0 (
    echo ❌ Failed to push schema
    exit /b 1
)
echo ✅ Schema pushed successfully
echo.

REM Step 3: Seed sample quiz data
echo 🌱 Step 3/4: Seeding sample quiz data...
call npm run seed:quiz
if %errorlevel% neq 0 (
    echo ⚠️  Warning: Seed failed ^(this is optional^)
) else (
    echo ✅ Sample data seeded
)
echo.

REM Step 4: Instructions
echo 🎯 Step 4/4: Ready to run!
echo.
echo Run the development server:
echo   npm run dev
echo.
echo Then visit:
echo   👤 User: http://localhost:3000/quiz
echo   🔧 Admin: http://localhost:3000/admin/quiz
echo.
echo 📚 Documentation:
echo   - QUIZ_QUICKSTART.md - Quick start guide
echo   - QUIZ_FEATURE_GUIDE.md - Complete documentation
echo   - IMPLEMENTATION_SUMMARY.md - Technical details
echo.
echo ✨ Feature is ready to use!
pause
