import { Model, InferAttributes, InferCreationAttributes, CreationOptional, NonAttribute, ModelStatic } from "vr-migrations"; import type { Device } from "./device.models"; import type { User } from "./user.models"; import type { Installment } from "./installment.models"; import { Payment } from "./payment.models"; export type PaymentPlanStatus = "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED"; export declare const PAYMENT_PLAN_STATUS: readonly ["PENDING", "ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]; export interface DevicePaymentPlanAttributes { id: string; userId: string; pricingSnapshot: Record; totalAmount: number; paidAmount: number; outstandingAmount: number; lastPaymentAt: Date | null; nextInstallmentDueAt: Date | null; status: PaymentPlanStatus; completedAt: Date | null; createdAt: Date; updatedAt: Date; devices?: Device[]; user: User; installments?: Installment[]; payment?: Payment; } export interface DevicePaymentPlanCreationAttributes extends Omit { id?: string; paidAmount?: number; outstandingAmount?: number; totalAmount?: number; status?: PaymentPlanStatus; } export declare class DevicePaymentPlan extends Model, InferCreationAttributes> implements DevicePaymentPlanAttributes { id: CreationOptional; userId: string; pricingSnapshot: Record; totalAmount: CreationOptional; paidAmount: CreationOptional; outstandingAmount: number; lastPaymentAt: CreationOptional; nextInstallmentDueAt: CreationOptional; status: CreationOptional; completedAt: CreationOptional; readonly createdAt: CreationOptional; readonly updatedAt: CreationOptional; devices?: NonAttribute; user: NonAttribute; installments?: NonAttribute; payment?: NonAttribute; static initialize(sequelize: any): void; static associate(models: Record>): void; updateProgress(): Promise; markAsDefaulted(): Promise; cancel(): Promise; calculateProgress(): number; getOverdueStatus(): Promise<{ isOverdue: boolean; daysOverdue: number; }>; shouldAutoLock(): Promise; getDevices(): Promise; getInstallments(options?: any): Promise; } export type DevicePaymentPlanModel = typeof DevicePaymentPlan;