<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Subscriptions extends Model
{
    use HasFactory;

    protected $table = 'subscriptions';
    protected $guarded = [];


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



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

    public function subscriptionProduct()
    {
        return $this->belongsTo(SubscriptionProducts::class, 'subscription_product_xid', 'id');
    }
} 
