import mongoose from 'mongoose';

import { IInventoryItem } from '../models/InventoryItem.model';
import { IReceivableItem } from '../models/ReceivableItem.model';
import { IAccountPayableItem } from '../models/AccountPayableItem.model';

export interface IUploadedItems<T extends IInventoryItem | IReceivableItem | IAccountPayableItem> {
  _id?: string;
  bbcDate: Date;
  borrowerId: string;
  fileName?: string;
  sheetName?: string;
  uploadUser?: string;
  fileHash?: string;
  comment?: string;
  items: T[];
}

export interface ICollateralItem {
  bbcSheetId: mongoose.Types.ObjectId;
  order: number;
}

export interface IPaginatorOptions {
  pageIndex: number;
  pageSize: number;
}

export const DEFAULT_PAGINATOR: IPaginatorOptions = {
  pageIndex: 0,
  pageSize: 20,
};
