<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
 use app\Models\IamPrincipal;
class ReferralUsers extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $table = 'referral_users';
    protected $guarded = [];
  

public function referredUser()
{
    return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
}

public function refeersUser()
{
    return $this->belongsTo(IamPrincipal::class, 'referred_user_xid', 'id');
}

}
