{
  "entities": {
    "User": {
      "title": "User",
      "description": "User profiles and metadata.",
      "type": "object",
      "properties": {
        "displayName": { "type": "string" },
        "email": { "type": "string" },
        "photoURL": { "type": "string" },
        "role": { "type": "string" },
        "createdAt": { "type": "string", "format": "timestamp" },
        "updatedAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["email"]
    },
    "Appointment": {
      "title": "Appointment",
      "description": "Patient appointments with doctors.",
      "type": "object",
      "properties": {
        "userId": { "type": "string" },
        "patientName": { "type": "string" },
        "patientEmail": { "type": "string" },
        "patientPhone": { "type": "string" },
        "doctorName": { "type": "string" },
        "doctorId": { "type": "string" },
        "appointmentDate": { "type": "string" },
        "appointmentTime": { "type": "string" },
        "status": { "type": "string" },
        "notes": { "type": "string" },
        "createdAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["patientName", "patientEmail", "doctorName"]
    },
    "GalleryItem": {
      "title": "GalleryItem",
      "description": "Gallery images for the clinic or events.",
      "type": "object",
      "properties": {
        "title": { "type": "string" },
        "description": { "type": "string" },
        "imageUrl": { "type": "string" },
        "category": { "type": "string" },
        "order": { "type": "number" },
        "createdAt": { "type": "string", "format": "timestamp" },
        "createdBy": { "type": "string" }
      },
      "required": ["imageUrl"]
    },
    "CMSPage": {
      "title": "CMSPage",
      "description": "Content Management System for dynamic pages (e.g., about, services).",
      "type": "object",
      "properties": {
        "pageId": { "type": "string" },
        "title": { "type": "string" },
        "content": { "type": "string" },
        "lastUpdated": { "type": "string", "format": "timestamp" },
        "updatedBy": { "type": "string" }
      },
      "required": ["pageId"]
    },
    "ContactMessage": {
      "title": "ContactMessage",
      "description": "Messages submitted via the contact form.",
      "type": "object",
      "properties": {
        "firstName": { "type": "string" },
        "lastName": { "type": "string" },
        "email": { "type": "string" },
        "subject": { "type": "string" },
        "message": { "type": "string" },
        "createdAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["firstName", "email", "message"]
    },
    "Doctor": {
      "title": "Doctor",
      "description": "Doctor profiles.",
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "role": { "type": "string" },
        "experience": { "type": "string" },
        "qualifications": { "type": "string" },
        "achievements": { "type": "string" },
        "contributions": { "type": "string" },
        "publications": { "type": "string" },
        "book": { "type": "string" },
        "expertise": { "type": "string" },
        "availability": { "type": "string" },
        "language": { "type": "string" },
        "image": { "type": "string" }
      },
      "required": ["name", "role"]
    },
    "Staff": {
      "title": "Staff",
      "description": "Staff profiles for About page.",
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "designation": { "type": "string" },
        "image": { "type": "string" }
      },
      "required": ["name", "designation"]
    },
    "InternshipApplication": {
      "title": "InternshipApplication",
      "description": "Applications submitted for internship.",
      "type": "object",
      "properties": {
        "fullName": { "type": "string" },
        "email": { "type": "string" },
        "phone": { "type": "string" },
        "resumeUrl": { "type": "string" },
        "createdAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["fullName", "email", "phone"]
    },
    "SEOSetting": {
      "title": "SEOSetting",
      "description": "Global SEO settings such as titles and meta tags.",
      "type": "object",
      "properties": {
        "siteTitle": { "type": "string" },
        "metaDescription": { "type": "string" },
        "metaKeywords": { "type": "string" },
        "ogTitle": { "type": "string" },
        "ogDescription": { "type": "string" },
        "ogImage": { "type": "string" },
        "twitterCard": { "type": "string" },
        "updatedAt": { "type": "string", "format": "timestamp" }
      }
    },
    "Review": {
      "title": "Review",
      "description": "Google Reviews fetched and saved for display on the home page.",
      "type": "object",
      "properties": {
        "authorName": { "type": "string" },
        "authorUrl": { "type": "string" },
        "profilePhotoUrl": { "type": "string" },
        "rating": { "type": "number" },
        "text": { "type": "string" },
        "time": { "type": "number" },
        "createdAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["authorName", "rating", "text"]
    },
    "Service": {
      "title": "Service",
      "description": "Services offered by the clinic.",
      "type": "object",
      "properties": {
        "title": { "type": "string" },
        "description": { "type": "string" },
        "icon": { "type": "string" },
        "createdAt": { "type": "string", "format": "timestamp" }
      },
      "required": ["title"]
    }
  },
  "firestore": {
    "/users/{userId}": {
      "schema": { "$ref": "#/entities/User" },
      "description": "User accounts"
    },
    "/appointments/{appointmentId}": {
      "schema": { "$ref": "#/entities/Appointment" },
      "description": "Appointments"
    },
    "/gallery/{galleryId}": {
      "schema": { "$ref": "#/entities/GalleryItem" },
      "description": "Gallery items"
    },
    "/cms/{cmsId}": {
      "schema": { "$ref": "#/entities/CMSPage" },
      "description": "Dynamic CMS content"
    },
    "/contact_messages/{messageId}": {
      "schema": { "$ref": "#/entities/ContactMessage" },
      "description": "Contact messages"
    },
    "/doctors/{doctorId}": {
      "schema": { "$ref": "#/entities/Doctor" },
      "description": "Doctors"
    },
    "/staff/{staffId}": {
      "schema": { "$ref": "#/entities/Staff" },
      "description": "Staff members"
    },
    "/internship_applications/{applicationId}": {
      "schema": { "$ref": "#/entities/InternshipApplication" },
      "description": "Internship applications"
    },
    "/seo_settings/{settingId}": {
      "schema": { "$ref": "#/entities/SEOSetting" },
      "description": "SEO settings"
    },
    "/patient_stories/{storyId}": {
      "schema": { "$ref": "#/entities/Review" },
      "description": "Patient stories (legacy/alias for reviews)"
    },
    "/reviews/{reviewId}": {
      "schema": { "$ref": "#/entities/Review" },
      "description": "Reviews"
    },
    "/services/{serviceId}": {
      "schema": { "$ref": "#/entities/Service" },
      "description": "Clinic services"
    }
  }
}
