import { Receipt } from "./receipt";
import { ReceiptItem } from "./receipt-item";

/**
 * Interface representing a return process within the OMS system.
 *
 * @interface ReturnProcess
 * @property {number} id - The unique identifier for this return process
 * @property {number} processId - The identifier of the parent process this return belongs to
 * @property {number} receiptId - The identifier of the associated receipt
 * @property {ReceiptItem} receiptItem - The specific item from the receipt being returned
 * @property {Date} receiptDate - The date when the receipt was created
 * @property {Record<string, unknown>} answers - A map of answers to return process questions
 * @property {string} [productCategory] - Optional category of the product being returned
 * @property {Receipt} [returnReceipt] - Optional receipt generated after the return is processed if this property is set the returnProcess is completed and should not be altered anymore
 */
export interface ReturnProcess {
  id: number;
  processId: number;
  receiptId: number;
  receiptItem: ReceiptItem;
  receiptDate: string | undefined;
  answers: Record<string, unknown>;
  productCategory: string;
  quantity: number;
  returnReceipt?: Receipt;
}
