Files
cheerstothe_season_2.0/app/Models/IamPrincipalSource.php
2024-05-23 16:41:29 +05:30

30 lines
682 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class IamPrincipalSource extends Model
{
use HasFactory;
use SoftDeletes;
protected $table = 'iam_principal_source';
protected $dates = ['deleted_at'];
protected $fillable =
[
'principal_source_title',
'is_active'
];
public function iamPrincipals()
{
return $this->hasMany(IamPrincipal::class, 'principal_source_xid', 'id');
}
public function source(){
return $this->hasOne(IamPrincipal::class,'id','principal_source_xid');
}
}