/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import mongoose from 'mongoose';
import { ILoanProductDoc } from './LoanProducts.model';
import { IBankDoc } from './Banks.model';
export declare enum ELoanTransactionTypes {
    COLLECTION = "COLLECTION",
    DISBURSEMENT = "DISBURSEMENT",
    ADJUSTMENT = "ADJUSTMENT",
    CHARGE = "CHARGE"
}
export declare const LOAN_TRANSACTION_DOWNLOAD_FIELDS: string[];
export declare const LOAN_TRANSACTION_FIELDS: string[];
export interface ILoanTransactionUpload {
    date: Date;
    ledgerAccountCode: string;
    amount: number;
    description: string;
    reference: string;
    customerId: string;
    bankAccountNumber: string;
    transactionType: ELoanTransactionTypes;
}
export interface ILoanTransaction {
    order?: number;
    date: Date;
    effectiveDate: Date;
    productId: mongoose.Types.ObjectId;
    chargeId?: mongoose.Types.ObjectId;
    amount: number;
    description: string;
    reference: string;
    referenceRaw?: string;
    customerId: string;
    bankId: mongoose.Types.ObjectId;
    transactionType: ELoanTransactionTypes;
    balance: number;
    floatedBalance: number;
    loanPaymentId?: mongoose.Types.ObjectId;
    userId?: string;
    isSent?: boolean;
}
export interface ILoanTransactionDocWithProduct extends ILoanTransactionDoc {
    product: ILoanProductDoc;
}
export interface ILoanTransactionWithId extends ILoanTransaction {
    _id: mongoose.Types.ObjectId;
}
export type ILoanTransactionView = Omit<ILoanTransactionWithId, 'order'>;
export type ILoanTransactionViewWithBank = ILoanTransactionView & {
    bank: IBankDoc;
};
export interface ILoanTransactionDoc extends ILoanTransaction, mongoose.Document {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface ILoanTransactionLean extends ILoanTransaction {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface ILoanTransactionPlain extends Omit<ILoanTransaction, 'productId' | 'bankId' | 'loanPaymentId' | 'chargeId'> {
    _id: string;
    productId: string;
    bankId: string;
    loanPaymentId: string;
    chargeId: string;
}
export type TLoanTransactionModel = mongoose.Model<ILoanTransaction>;
export interface ILoanTransactionModel extends mongoose.Model<ILoanTransaction> {
    findByIdAndDeleteWithUserId(id: string, userId: string): Promise<void>;
}
export interface ITransactionsFilter {
    periodStart: Date;
    periodEnd: Date;
    borrowerId: string;
    productId: string;
    amount?: number;
    reference?: string;
}
export declare const LoanTransactionSchema: mongoose.Schema<ILoanTransactionDoc, ILoanTransactionModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ILoanTransactionDoc, mongoose.Document<unknown, {}, mongoose.FlatRecord<ILoanTransactionDoc>> & mongoose.FlatRecord<ILoanTransactionDoc> & Required<{
    _id: mongoose.Types.ObjectId;
}>>;
export declare const LoanTransaction: ILoanTransactionModel;
