'integer', 'invoice_id' => 'integer', 'parent_id' => 'integer', 'wrong_paid_amount' => 'decimal:2', // adjust precision if needed 'logged_by' => 'integer', 'logged_at' => 'datetime', ]; /* Optional relationships */ public function invoice() { return $this->belongsTo(Invoice::class, 'invoice_id'); } public function parent() { return $this->belongsTo(User::class, 'parent_id'); } public function logger() { return $this->belongsTo(User::class, 'logged_by'); } }