import { Document, Types } from 'mongoose';
import { IPaginateModel } from '@/shared/interfaces/model.interface';
import { AuditFields } from '@/shared/types/common';
import { BankAccountType, Status } from '@/shared/constants/enum.constant';

export interface QueryFilter {
  search?: string;
  company?: string;
  [key: string]: unknown;
}

export interface IBankAccountBase {
  company?: Types.ObjectId | string;
  bankName?: string;
  accountNumber?: number;
  accountHolderName?: string;
  ifscCode?: string;
  branch?: string;
  accountType?: BankAccountType;
  status?: Status;
  isDeleted?: boolean;
}

export interface IBankAccount extends IBankAccountBase, AuditFields {}

export interface IBankAccountDoc extends IBankAccount, Document {}

export interface IBankAccountModel extends IPaginateModel<IBankAccountDoc> {}

export type NewCreatedBankAccount = IBankAccountBase &
  Partial<Pick<AuditFields, 'createdBy' | 'updatedBy'>>;

export type UpdateBankAccountBody = Partial<IBankAccount>;
