<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;

class ProductOrganisation extends Model
{
    use HasFactory;

    protected $fillable = [
        'name', 
        'product_id',
        'organisation_id',
        'is_active'
    ];

    ///Define Parent reletionship
    public function organisation() : HasOne{
        return $this->hasOne(Organisation::class);
    }
    public function payratyProduct() : HasOne{
        return $this->hasOne(PayratyProduct::class);
    }
}