'array', 'seller_snapshot' => 'array', 'lead_snapshot' => 'array', 'items' => 'array', 'resolved_fields' => 'array', 'page_width_mm' => 'integer', 'page_height_mm' => 'integer', 'subtotal' => 'decimal:2', 'discount' => 'decimal:2', 'tax' => 'decimal:2', 'total' => 'decimal:2', 'paid_amount' => 'decimal:2', 'due_date' => 'date', 'issued_at' => 'datetime', 'approved_at' => 'datetime', 'rejected_at' => 'datetime', 'voided_at' => 'datetime', 'version' => 'integer', ]; } public function lead(): BelongsTo { return $this->belongsTo(Lead::class); } public function template(): BelongsTo { return $this->belongsTo(InvoiceTemplate::class, 'invoice_template_id'); } public function creator(): BelongsTo { return $this->belongsTo(User::class, 'created_by'); } public function approver(): BelongsTo { return $this->belongsTo(User::class, 'approved_by'); } }