export type PaymentStatus = 'pending' | 'success' | 'failed' | 'refunded';

export interface Order {
  id: string;
  userId: string;
  amount: number;
  currency: string;
  status: PaymentStatus;
  items: OrderItem[];
  createdAt: Date;
  updatedAt: Date;
}

export interface OrderItem {
  id: string;
  productId: string;
  productType: 'section' | 'full_book' | 'membership';
  quantity: number;
  price: number;
}

export interface PaymentProvider {
  name: string;
  createOrder(order: Order): Promise<{ payUrl: string; orderId: string }>;
  checkStatus(orderId: string): Promise<PaymentStatus>;
}
