{
  "entities": {
    "Review": {
      "title": "Review",
      "description": "Product review submitted by customer",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "productId": { "type": "number" },
        "productName": { "type": "string" },
        "authorName": { "type": "string" },
        "authorEmail": { "type": "string" },
        "rating": { "type": "number" },
        "comment": { "type": "string" },
        "date": { "type": "string" },
        "status": { "type": "string", "enum": ["pending", "approved", "rejected"] }
      },
      "required": ["productId", "productName", "authorName", "authorEmail", "rating", "comment", "status"]
    },
    "Order": {
      "title": "Order",
      "description": "Customer order booking",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "createdAt": { "type": "string" },
        "updatedAt": { "type": "string" },
        "status": { "type": "string", "enum": ["Booking", "Processing", "Dispatched", "Delivered", "Cancelled"] },
        "customer": { "type": "object" },
        "items": { "type": "array" },
        "totals": { "type": "object" },
        "courierInfo": { "type": "object" },
        "pdfUrl": { "type": "string" },
        "emailStatus": { "type": "object" },
        "adminNotes": { "type": "string" },
        "timeline": { "type": "array" }
      },
      "required": ["id", "createdAt", "status", "customer", "items", "totals"]
    },
    "NewsletterSubscriber": {
      "title": "NewsletterSubscriber",
      "description": "Newsletter subscriber document",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "email": { "type": "string" },
        "status": { "type": "string", "enum": ["active", "unsubscribed"] },
        "source": { "type": "string", "enum": ["footer", "checkout", "admin"] },
        "subscribedAt": { "type": "string" },
        "updatedAt": { "type": "string" },
        "totalEmailsSent": { "type": "number" },
        "lastEmailSent": { "type": "string" },
        "notes": { "type": "string" }
      },
      "required": ["id", "email", "status", "source", "subscribedAt"]
    },
    "NewsletterEmailHistory": {
      "title": "NewsletterEmailHistory",
      "description": "Broadcast newsletter history record",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "subject": { "type": "string" },
        "html": { "type": "string" },
        "totalRecipients": { "type": "number" },
        "successCount": { "type": "number" },
        "failedCount": { "type": "number" },
        "startedAt": { "type": "string" },
        "completedAt": { "type": "string" },
        "createdBy": { "type": "string" }
      },
      "required": ["id", "subject", "totalRecipients", "successCount", "failedCount", "startedAt"]
    },
    "Coupon": {
      "title": "Coupon",
      "description": "Discount coupon code",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "couponCode": { "type": "string" },
        "discountType": { "type": "string", "enum": ["percentage"] },
        "discountPercent": { "type": "number" },
        "status": { "type": "string", "enum": ["active", "inactive", "expired"] },
        "description": { "type": "string" },
        "usageLimit": { "type": "number" },
        "totalUsed": { "type": "number" },
        "validFrom": { "type": "string" },
        "validUntil": { "type": "string" },
        "minimumOrderAmount": { "type": "number" },
        "maximumDiscount": { "type": "number" },
        "createdAt": { "type": "string" },
        "updatedAt": { "type": "string" }
      },
      "required": ["id", "couponCode", "discountType", "discountPercent", "status"]
    },
    "TeamMember": {
      "title": "TeamMember",
      "description": "Collaborative executive team member details and image URL",
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "name": { "type": "string" },
        "role": { "type": "string" },
        "bio": { "type": "string" },
        "imageUrl": { "type": "string" },
        "email": { "type": "string" },
        "updatedAt": { "type": "string" }
      },
      "required": ["id", "name", "role", "email"]
    }
  },
  "firestore": {
    "/reviews/{reviewId}": {
      "schema": "Review",
      "description": "Collection of customer product reviews"
    },
    "/orders/{orderId}": {
      "schema": "Order",
      "description": "Collection of customer orders"
    },
    "/newsletterSubscribers/{subscriberId}": {
      "schema": "NewsletterSubscriber",
      "description": "Collection of newsletter subscribers"
    },
    "/newsletterEmailHistory/{historyId}": {
      "schema": "NewsletterEmailHistory",
      "description": "Collection of newsletter email logs"
    },
    "/coupons/{couponId}": {
      "schema": "Coupon",
      "description": "Collection of discount coupons"
    },
    "/teamMembers/{memberId}": {
      "schema": "TeamMember",
      "description": "Collection of collaborative team members and image URLs"
    }
  }
}
