import { Model, InferAttributes, InferCreationAttributes, CreationOptional, NonAttribute, ModelStatic } from "vr-migrations"; import type { DevicePaymentPlan } from "./devicePaymentPlan.models"; import type { Payment } from "./payment.models"; export type InstallmentStatus = "PENDING" | "PAID" | "OVERDUE" | "SKIPPED"; export declare const INSTALLMENT_STATUS: readonly ["PENDING", "PAID", "OVERDUE", "SKIPPED"]; export interface InstallmentAttributes { id: string; devicePaymentPlanId: string; installmentNumber: number; amount: number; dueDate: Date; paidAt: Date | null; paidAmount: number | null; status: InstallmentStatus; paymentId: string | null; isAutoGenerated: boolean; metadata: Record; createdAt: Date; updatedAt: Date; paymentPlan?: DevicePaymentPlan; payment?: Payment; } export interface InstallmentCreationAttributes extends Omit { id?: string; paidAt?: Date | null; paidAmount?: number | null; status: InstallmentStatus; paymentId?: string | null; metadata?: Record; paymentPlan: DevicePaymentPlan; payment?: Payment; } export declare class Installment extends Model, InferCreationAttributes> implements InstallmentAttributes { id: CreationOptional; devicePaymentPlanId: string; installmentNumber: number; amount: number; dueDate: Date; paidAt: CreationOptional; paidAmount: CreationOptional; status: InstallmentStatus; paymentId: CreationOptional; isAutoGenerated: boolean; metadata: CreationOptional>; readonly createdAt: CreationOptional; readonly updatedAt: CreationOptional; paymentPlan: NonAttribute; payment?: NonAttribute; static initialize(sequelize: any): void; static associate(models: Record>): void; markAsPaid(paymentId: string, paidAmount?: number): Promise; markAsOverdue(): Promise; skip(): Promise; isPaid(): boolean; isOverdue(): boolean; isPending(): boolean; daysUntilDue(): number; daysOverdue(): number; static getOverdueInstallments(): Promise; static getPendingForPlan(planId: string): Promise; } export type InstallmentModel = typeof Installment;