// MongoDB Product Model Schema
export interface Product {
  _id?: string;
  title: string;
  sku: string;
  barcode?: string;
  description: string;
  shortDescription?: string;
  fullDescription?: string;
  productDetails?: any; // JSON object for specifications
  
  // Pricing
  price: number;
  cost?: number;
  compareAtPrice?: number; // Original price for sale items
  currency: string;
  
  // Inventory
  qty: number;
  stock: number;
  trackInventory: boolean;
  lowStockThreshold?: number;
  
  // Images
  photoUrl?: string;
  images?: string[];
  
  // Categories
  category?: string;
  scat?: string; // Sub-category
  cat?: string;
  tags?: string[];
  
  // SEO (Auto-generated)
  seo?: {
    metaTitle?: string;
    metaDescription?: string;
    metaKeywords?: string;
    slug?: string;
    ogTitle?: string;
    ogDescription?: string;
    ogImage?: string;
    twitterCard?: string;
    structuredData?: any; // JSON-LD
  };
  
  // Product attributes
  brand?: string;
  supplier?: string;
  mfg?: string; // Manufacturer
  rack?: string;
  weight?: number;
  dimensions?: {
    length?: number;
    width?: number;
    height?: number;
    unit?: string; // "cm", "inches"
  };
  
  // Status
  active: boolean;
  featured?: boolean;
  
  // Google Shopping fields
  googleProductCategory?: string; // Google's product taxonomy
  gtin?: string; // Global Trade Item Number
  mpn?: string; // Manufacturer Part Number
  condition?: string; // "new", "used", "refurbished"
  availability?: string; // "in stock", "out of stock", "preorder"
  
  // Additional
  itc1?: string;
  itn?: string;
  lastSell?: number;
  newCost?: number;
  
  createdAt?: Date;
  updatedAt?: Date;
}

