// Auto-generated types for MealPrep

// ─── Base ───────────────────────────────────────────
export interface User {
  id: string;
  phone: string;
  nickname: string;
  avatarUrl: string;
  createdAt: string;
  updatedAt: string;
}

export interface Product {
  id: string;
  title: string;
  price: number;
  stock: number;
  images: string[];
  categoryId: string;
  createdAt: string;
}

export interface Order {
  id: string;
  userId: string;
  status: "pending" | "paid" | "shipped" | "delivered" | "cancelled";
  totalAmount: number;
  addressId: string;
  createdAt: string;
}

export interface Logistics {
  id: string;
  orderId: string;
  carrier: string;
  trackingNumber: string;
  status: string;
  events: LogisticsEvent[];
}

export interface LogisticsEvent {
  timestamp: string;
  location: string;
  description: string;
}

// ─── API Responses ──────────────────────────────────
export interface ApiResponse<T> {
  data: T;
  message: string;
}

export interface PaginatedResponse<T> extends ApiResponse<T[]> {
  total: number;
  page: number;
  pageSize: number;
}

export interface ApiError {
  code: string;
  message: string;
  details?: Record<string, string[]>;
}