{ "database": { "name": "customer360_retail_db", "collections": [ { "name": "customers", "fields": { "_id": "ObjectId", "customer_id": "String", "first_name": "String", "last_name": "String", "email": "String", "phone": "String", "date_of_birth": "Date", "gender": "String", "registration_date": "Date", "customer_segment": "String", "preferences": "Array", "address": { "street": "String", "city": "String", "state": "String", "zipcode": "String", "country": "String" }, "opt_in_marketing": "Boolean", "created_at": "Date", "updated_at": "Date" }, "indexes": [ {"customer_id": 1, "unique": true}, {"email": 1, "unique": true}, {"phone": 1}, {"customer_segment": 1} ] }, { "name": "transactions", "fields": { "_id": "ObjectId", "transaction_id": "String", "customer_id": "String", "transaction_date": "Date", "items_purchased": [ { "product_id": "String", "product_name": "String", "category": "String", "quantity": "Int", "price": "Double" } ], "payment_method": "String", "total_amount": "Double", "store_id": "String", "channel": "String", "created_at": "Date" }, "indexes": [ {"transaction_id": 1, "unique": true}, {"customer_id": 1}, {"transaction_date": -1}, {"store_id": 1} ] }, { "name": "products", "fields": { "_id": "ObjectId", "product_id": "String", "name": "String", "description": "String", "category": "String", "sub_category": "String", "brand": "String", "price": "Double", "available": "Boolean", "created_at": "Date", "updated_at": "Date" }, "indexes": [ {"product_id": 1, "unique": true}, {"category": 1}, {"brand": 1}, {"available": 1} ] }, { "name": "web_activities", "fields": { "_id": "ObjectId", "activity_id": "String", "customer_id": "String", "session_id": "String", "activity_type": "String", "page_url": "String", "referrer": "String", "device": { "device_type": "String", "browser": "String", "os": "String" }, "activity_timestamp": "Date", "metadata": "Object", "created_at": "Date" }, "indexes": [ {"activity_id": 1, "unique": true}, {"customer_id": 1}, {"session_id": 1}, {"activity_type": 1}, {"activity_timestamp": -1} ] }, { "name": "marketing_campaigns", "fields": { "_id": "ObjectId", "campaign_id": "String", "name": "String", "description": "String", "start_date": "Date", "end_date": "Date", "channels": "Array", "segment_targets": "Array", "status": "String", "budget": "Double", "spent": "Double", "performance_metrics": "Object", "created_at": "Date", "updated_at": "Date" }, "indexes": [ {"campaign_id": 1, "unique": true}, {"name": 1}, {"status": 1}, {"start_date": -1} ] }, { "name": "support_interactions", "fields": { "_id": "ObjectId", "interaction_id": "String", "customer_id": "String", "date": "Date", "channel": "String", "support_agent": "String", "reason": "String", "resolution_status": "String", "resolution_time_minutes": "Int", "notes": "String", "created_at": "Date" }, "indexes": [ {"interaction_id": 1, "unique": true}, {"customer_id": 1}, {"date": -1}, {"resolution_status": 1} ] }, { "name": "loyalty_program", "fields": { "_id": "ObjectId", "customer_id": "String", "loyalty_number": "String", "points": "Int", "membership_tier": "String", "enrolled_date": "Date", "last_activity_date": "Date", "rewards_redeemed": "Array", "created_at": "Date", "updated_at": "Date" }, "indexes": [ {"customer_id": 1, "unique": true}, {"loyalty_number": 1, "unique": true}, {"membership_tier": 1} ] }, { "name": "analytics_reports", "fields": { "_id": "ObjectId", "report_id": "String", "generated_date": "Date", "report_type": "String", "time_period": { "start_date": "Date", "end_date": "Date" }, "parameters": "Object", "result": "Object", "generated_by": "String", "created_at": "Date" }, "indexes": [ {"report_id": 1, "unique": true}, {"report_type": 1}, {"generated_date": -1} ] }, { "name": "users", "fields": { "_id": "ObjectId", "user_id": "String", "name": "String", "email": "String", "password_hash": "String", "role": "String", "permissions": "Array", "created_at": "Date" }, "indexes": [ {"user_id": 1, "unique": true}, {"email": 1, "unique": true}, {"role": 1} ] } ] } }